"Jrgen_P._Tjern":
> The thing that's acting up is a dir handle. I opendir() it, and I can
> read fine from it. A bit later in the programs execution, and readdir()
> returns NULL (right after I rewinddir()), and errno is not set.

So your application calls,
{
        opendir();
        readdir();
        /* do something */
        rewinddir();
        readdir();      // returns NULL illegally
}


> I'm trying to figure out what's wrong, and I'm starting to consider two
> viable options: memory error or aufs. Could this be the doing of aufs?
> Any way to debug it on a bit lower level? Any suggestions?

First, you need to check whether the second readdir(3) issues
getdents(2) or not. Try strace. Also check it arguments, especially the
i/o position in the dir.

If getdents(2) is called and the potision is 0 (ie. rewinded correctly),
then try aufs debug output such like this.
You need to enable CONFIG_AUFS_DEBUG. It will print debug messages to
syslog.

fs/aufs/dir.c:
static int aufs_readdir(struct file *file, void *dirent, filldir_t filldir)
{
        au_debug_on();
        ;;;
        au_debug_off();
}


Junjiro Okajima

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Reply via email to