| To: | "William L. Jones" <jones@xxxxxxxxxxxxxxxxxx>, lord@xxxxxxx |
|---|---|
| Subject: | Re: Just a small reminder |
| From: | "William L. Jones" <jones@xxxxxxxxxxxxxxxxxx> |
| Date: | Sun, 17 Sep 2000 12:27:45 -0500 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <4.2.0.58.20000917115310.00a1e750@xxxxxxxxx> |
| References: | <200009171351.IAA27556@xxxxxxxxxxxxxxxxxxxx> <Your message of "Sat, 16 Sep 2000 17:31:38 CDT> |
| Sender: | owner-linux-xfs@xxxxxxxxxxx |
At 12:11 PM 9/17/00 -0500, William L. Jones wrote: At 08:50 AM 9/17/00 -0500, lord@xxxxxxx wrote:> > > The use the dentry d_iput function creates a problem with nfsd. It to > creates a dentry from an iget like open_by_filehndle and will cause > vnode reference problems. Couldn't this problem be solved cleaner > by using the linux provided iop functions like put_inode and clear_inode. > Then the nfs would not have special case for xfs. > > > Given the way the vn_rele works currently is their a problem with it > marking the vnode inactive. Linux will retain > the inode in its cache until it decides to prune it, which means it may > reuse it. Wouldn't it be > better to mark it inactive in a clear_inode call? > > > Bill Jones Yes, I am aware of this. The issues here are that the put_inode method is racey in that it always calls put inode, then does an atomic decrement and lock on the count. Only if the count hits zero does it obtain a lock and do special processing. It is quite possible we would call the inactive code, and then have something else grab a reference count.But you have the same problem with the current code. Theiris no difference between using dcache d_iput or the supper operation put_inode.!In both cases most of the iput work is done after the call to vn_rele. The second method is better since it works with nfsd. Can xfs_inactive sleep? It it can then both methods have a problem because it is possible to have a d_iput or iput running vn_rele at the same time and i_count will be greater then 1! Oops! If we get to xfs_inactive it is the last iput. I still worry that it is possible for two iput to be done at the same time give that the that vn_rele does a VN_LOCK. If you are doing a lock you can sleep! Still this may only be a mpp thing! Using d_iput is not perfect either as we cannot hold a lock across all of it. Marking the vnode inactive is not a problem here, we do not remove the inode from the system at this point, that is done in the clear inode phase. In fact XFS will keep xfs inodes after the linux inode has gone in some cases. We cannot use clear_inode to call inactive, as you only get here on inode reuse. This is a long time later.I found the clear_inode code!Steve |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Just a small reminder, William L. Jones |
|---|---|
| Next by Date: | CLOSE 800992 - pagebuf_init call to kmem_cache_create BUG(), dxm@xxxxxxxxxxxx |
| Previous by Thread: | Re: Just a small reminder, William L. Jones |
| Next by Thread: | Re: Just a small reminder, Steve Lord |
| Indexes: | [Date] [Thread] [Top] [All Lists] |