[Pvfs2-developers] kernel readdir question

Murali Vilayannur murali.vilayannur at gmail.com
Wed Nov 8 12:45:44 EST 2006


Hi Phil,
I dont have the code to check up on that right now. but if I recall
correctly, we don't want to fill . and .. multiple times and we use
the directory_version check as a crude way to know when to fill it and
when not.
i.e. if that was 0, we are starting out to read the directory and so
we fill . and ..
After the entire readdir is over we set the version back to 0.
It is possible there is a bug. I can check it up later today and get
back to you.
thanks,
Murali

On 11/8/06, Phil Carns <pcarns at wastedcycles.org> wrote:
> It's been a while since I've seen this bug first hand, but I am just now
> getting around to looking at it.
>
> Every once in a while we have seen cases where "ls -al" in a pvfs2
> directory fails to show the "." and ".." entries.  I _think_ this has
> mainly occurred after restarting pvfs2-client and/or pvfs2-server, but I
> am not certain.  I can't seem to reproduce it.
>
> At any rate, looking at the code in dir.c, it seems like filling in the
> "." and ".." entries should be pretty much automatic.  However, there is
> an if statement wrapped around the filldir() calls that looks like this:
>
>          if (pvfs2_inode->directory_version == 0)
>          {
>
> Anyone know what the purpose if this check is?  It seems to me like "."
> and ".." should be entries for position 0 and 1 regardless of the
> directory version, but I may be missing something.
>
> -Phil
> _______________________________________________
> Pvfs2-developers mailing list
> Pvfs2-developers at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers
>


More information about the Pvfs2-developers mailing list