[PVFS-developers] kernel lstat flood

Don Porter porterde at mercury.hendrix.edu
Wed Jul 14 13:26:06 EDT 2004


Hello all,

In some tests we noticed that during writes on files with longer
filenames, the manager seems to be flooded with lstat requests.  Upon
investigation, it seems that the patch sent in by Alan Rainey to
revalidate the inodes on writes (and two other operations) checks
d_iname instead of d_name.  

I looked in the kernel code (at least for our RH7.3 kernel) and it seems
that d_iname is a pointer to d_name.name unless the name is longer than
23 characters, in which case it is ignored.  Thus, on a longer file
name, d_iname is garbage and is being checked to see if the inode needs
revalidation.  So, on every write, revalidate inode is being called. 
The worst part, though, is that because d_iname is never updated or
used, it is called _every_ time.  

I also looked in the 2.6.7 vfs code and the code is almost identical. 
There may be some older kernels where d_iname is actually used for
something...

The attached patch seems to fix this problem.  It ought to be a pretty
intuitive change, but as always, I am open to others' thoughts.

Thanks,
Don
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel-lstat-flood.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs-developers/attachments/20040714/3ebcb857/kernel-lstat-flood.bin


More information about the PVFS-developers mailing list