xfs
[Top] [All Lists]

Re: Just a small reminder

To: "William L. Jones" <jones@xxxxxxxxxxxxxxxxxx>
Subject: Re: Just a small reminder
From: lord@xxxxxxx
Date: Sun, 17 Sep 2000 08:50:59 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Your message of "Sat, 16 Sep 2000 17:31:38 CDT
Sender: owner-linux-xfs@xxxxxxxxxxx
> 
> 
> 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.

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.

Steve


<Prev in Thread] Current Thread [Next in Thread>