[Pvfs2-developers] kernel readdir question

Sam Lang slang at mcs.anl.gov
Thu Nov 9 15:19:21 EST 2006


Attached patch that removes directory_version from the pvfs2_inode  
struct and seems to fix the missing . and .. bug.  Let me know if it  
looks ok.

-sam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: directory_version.patch
Type: application/octet-stream
Size: 9070 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20061109/e8ab2aac/directory_version-0001.obj
-------------- next part --------------


On Nov 9, 2006, at 1:09 PM, Murali Vilayannur wrote:

> Hey Sam,
>
>> >
>> Agreed, but the directory_version field will be non-zero, since we
>> didn't let the readdirs complete the listing.  This prevents the .
>> and .. from getting added on the next ls.
>
> I am not sure that will happen because each ls will reopen the  
> directory and
> iterate through. If people want . and .. they have to rewind to the
> beginning and/or reopen
> the directory...
>
>> I think we're in agreement then.
> I do agree though that we don't need the version field..
>
>> I think I can look at it if that's alright.
>
>
> By all means! :)
> thanks,
> Murali
>
>>
>> -sam
>>
>> > thanks,
>> > Murali
>> >
>> >> -sam
>> >>
>> >> > 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
>> >> >>
>> >> > _______________________________________________
>> >> > 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