2002-04-23 07:51:47

by Hirokazu Takahashi

[permalink] [raw]
Subject: [PATCH] kNFSd BKL removal - fixes and refines

Hi Neil,

This is a patch making your "kNFSd BKL removal code" better.
Could you check it and merge to your next patch ?

ftp://ftp.valinux.co.jp/pub/people/taka/tune/2.5.8/va06-knfsd_smp-2.5.8.patch

1. Fix some problems that kNFSd might Oops potentially when it turns
a NFS file-handle into a dentry.

- The dentry child should be checked whether it is alive or dead
in nfsd_findparent() or kNFSd might use a DEAD inode,
I mean the child might have been moved to another directory and
someone might try to remove the parent.
- kNFSd may refer NULL pointer in nfsd_findparent() when
child->d_inode->i_op->lookup() can't find ".." , as following
"if statement" -- if (!pdentry) -- is wrong.
- We should grab the i_sem all the time in splice() or the dentry
parent might be removed between nfsd_get_name() and d_splice().

I guess 2.4.18 also have the same problems.

2. Remove the BKL in find_fh_dentry() as much as we can.
3. The statics info of nfsd and rpc should be accessed atomically.
4. Grab the spinlock while we copy the readahead info in nfsd_read();
5. The referrence count of readahead cache (p_count) should be
increment or decrement atomically.


And a following is another patch to increase the number of readahead cache
with a hash table.

ftp://ftp.valinux.co.jp/pub/people/taka/tune/2.5.8/va07-knfsd-ra_hash-2.5.8.patch


Thank you,
Hirokazu Takahashi.

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2002-04-24 02:05:50

by Hirokazu Takahashi

[permalink] [raw]
Subject: Re: [PATCH] kNFSd BKL removal - fixes and refines

Hello,

taka> Hi Neil,
taka>
taka> This is a patch making your "kNFSd BKL removal code" better.
taka> Could you check it and merge to your next patch ?
taka>
taka> ftp://ftp.valinux.co.jp/pub/people/taka/tune/2.5.8/va06-knfsd_smp-2.5.8.patch
taka>
taka> 1. Fix some problems that kNFSd might Oops potentially when it turns
taka> a NFS file-handle into a dentry.
taka>
taka> - The dentry child should be checked whether it is alive or dead
taka> in nfsd_findparent() or kNFSd might use a DEAD inode,
taka> I mean the child might have been moved to another directory and
taka> someone might try to remove the parent.

Sorry. following statement is my fault.
Please ignore it.

taka> - kNFSd may refer NULL pointer in nfsd_findparent() when
taka> child->d_inode->i_op->lookup() can't find ".." , as following
taka> "if statement" -- if (!pdentry) -- is wrong.


taka> - We should grab the i_sem all the time in splice() or the dentry
taka> parent might be removed between nfsd_get_name() and d_splice().
taka>
taka> I guess 2.4.18 also have the same problems.
taka>
taka> 2. Remove the BKL in find_fh_dentry() as much as we can.
taka> 3. The statics info of nfsd and rpc should be accessed atomically.
taka> 4. Grab the spinlock while we copy the readahead info in nfsd_read();
taka> 5. The referrence count of readahead cache (p_count) should be
taka> increment or decrement atomically.

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs