public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Niv Sardi <xaiki@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Don't use d_alloc_anon for open_by_handle
Date: Mon, 05 May 2008 16:33:34 +1000	[thread overview]
Message-ID: <ncczlr5b6pt.fsf@sgi.com> (raw)
In-Reply-To: <20080502060654.GA23912@infradead.org> (Christoph Hellwig's message of "Fri, 2 May 2008 02:06:54 -0400")

Christoph Hellwig <hch@infradead.org> writes:
> On Fri, May 02, 2008 at 11:55:37AM +1000, xaiki@sgi.com 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.

I must be missing a point here, can you please further explain why is it
buggy ? We are indeed abusing the normal dentry life, but that's what we
want libhandle to be. i.e. We really don't need it connected, we don't
need to know anything about that file, we just want to access it.

> What really needs to be done in the handle code is to do the full
> reconnect logic nfsd would be doing. 

That would be slow, and we don't really need it. What is wrong with
having a temp hanging dentry if it gets thorn appart properly ? The
dentry we're using never makes it to any kind of cache. We don't even
have security concerns as the 2 pieces of code can only be triggered by
root.

> 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.

Cheers,
-- 
Niv Sardi

  reply	other threads:[~2008-05-05  6:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080501070244.GH108924158@sgi.com>
2008-05-02  1:55 ` Don't use d_alloc_anon for open_by_handle xaiki
2008-05-02  1:55   ` [PATCH] Don't use hashed dentries when doing open_by_handle xaiki
2008-05-02  1:55     ` [PATCH] Use xfs_d_alloc_anon for DM rdwr using handle code xaiki
2008-05-02  6:06   ` Don't use d_alloc_anon for open_by_handle Christoph Hellwig
2008-05-05  6:33     ` Niv Sardi [this message]
2008-05-05  9:53       ` Christoph Hellwig
2008-05-05 18:44         ` Christoph Hellwig
2008-05-05 20:51           ` Greg Banks
2008-05-06  1:38           ` Niv Sardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ncczlr5b6pt.fsf@sgi.com \
    --to=xaiki@sgi.com \
    --cc=hch@infradead.org \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox