xfs
[Top] [All Lists]

Re: Don't use d_alloc_anon for open_by_handle

To: xaiki@xxxxxxx
Subject: Re: Don't use d_alloc_anon for open_by_handle
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 2 May 2008 02:06:54 -0400
Cc: xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <1209693339-4861-1-git-send-email-xaiki@xxxxxxx>
References: <20080501070244.GH108924158@xxxxxxx> <1209693339-4861-1-git-send-email-xaiki@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
On Fri, May 02, 2008 at 11:55:37AM +1000, xaiki@xxxxxxx wrote:
> One of our DMAPI user found that in some cases inodes weren't getting through
> xfs_inactive() in any reasonable amount of time. Investigation tracked it down
> to the use of d_alloc_anon() combined with another thread accessing the same
> inode via an open().
> 
> So we introduce a stripped down version of d_alloc_anon, that won't try to 
> find
> an existing dentry, nor will hash it.

No, this is even more buggy than using d_alloc_anon.  What really needs
to be done in the handle code is to do the full reconnect logic nfsd
would be doing.  Aka you should be using exportfs_decode_fh and update
xfs's fh_to_dentry method to accept the file handle type used by the
handle interface.


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