[PVFS-developers] kernel lstat flood
Rob Ross
rross at mcs.anl.gov
Tue Jul 20 11:32:46 EDT 2004
Hey,
Thanks for the catch; applied!
Rob
On Wed, 14 Jul 2004, Don Porter wrote:
> 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
>
More information about the PVFS-developers
mailing list