Ticket #13 (closed bug: fixed)

Opened 7 months ago

Last modified 7 months ago

missing 26th dir entry on NFS export

Reported by: carns@mcs.anl.gov Assigned to: carns@mcs.anl.gov
Priority: major Component: Client Daemon
Version: 2.7.0 Keywords: nfs export 26 directory entry
Cc:

Description

Description of problem is in this mailing list thread:

http://www.beowulf-underground.org/pipermail/pvfs2-users/2007-December/002221.html

Change History

02/01/08 11:39:27 changed by carns@mcs.anl.gov

I'll give this a whirl and see if the problem is still there; we have changed several directory related things lately.

02/01/08 12:45:43 changed by carns@mcs.anl.gov

Not exactly fixed. Now we get 2 extra entries rather than 1 two few in the 50 entry test case.

Maybe we can average the two? :)

Will look to see if this has anything to do with the directory seeking stuff.

02/01/08 13:15:23 changed by carns@mcs.anl.gov

Doh. knfsd does indeed seek on directories:

http://lxr.linux.no/linux/fs/nfsd/vfs.c#L1749

In fact, it reopens the directory each time it services a request to read a chunk of entries. On its way out it seeks + 1 into the directory, records the return value, and uses that as the starting point to seek to for the next time it opens the directory.

This evidently didn't work all that great before, and its broken slightly differently now because of the magic we do on SEEK_SET for directories as of a few days ago.

Need to figure out if there is a reasonable combination of what to do on SEEK_CUR and SEEK_SET to make the token value come out right. Yuck.

02/01/08 17:10:31 changed by carns@mcs.anl.gov

Ahh, the real problem was not with directory seeks, but with what we set the f_pos to on the first readdir pass if a filldir fails.

I have confirmed on a test machine that correcting this logic fixes the problem, but going to look and see what we need to do with directory seeks before committing.

02/01/08 19:26:08 changed by carns@mcs.anl.gov

  • status changed from new to closed.
  • resolution set to fixed.

Fixed now in trunk and branch. Everything from both this ticket and the odd directory problem in this ticket:

https://trac.mcs.anl.gov/projects/pvfs/ticket/11

... now work by setting f_pos correctly if filldir() fails on the first readdir() iteration. The directory seek implementation has now been backed out.