From: David Wysochanski <dwysocha@redhat.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"jlayton@redhat.com" <jlayton@redhat.com>
Subject: Re: [PATCH] nfs: Don't allow NFS silly-renamed files to be deleted, no signal
Date: Fri, 22 Feb 2013 13:54:43 -0500 [thread overview]
Message-ID: <1361559283.19046.842.camel@localhost.localdomain> (raw)
In-Reply-To: <4FA345DA4F4AE44899BD2B03EEEC2FA9235DC4AF@SACEXCMBX04-PRD.hq.netapp.com>
On Fri, 2013-02-22 at 18:02 +0000, Myklebust, Trond wrote:
> On Tue, 2013-02-19 at 08:59 -0500, Dave Wysochanski wrote:
> > Commit 73ca100 broke the code that prevents the client from deleting
> > a silly renamed dentry. This affected "delete on last close"
> > semantics as after that commit, nothing prevented removal of
> > silly-renamed files. As a result, a process holding a file open
> > could easily get an ESTALE on the file in a directory where some
> > other process issued 'rm -rf some_dir_containing_the_file' twice.
> > Before the commit, any attempt at unlinking silly renamed files would
> > fail inside may_delete() with -EBUSY because of the
> > DCACHE_NFSFS_RENAMED flag. The following testcase demonstrates
> > the problem:
> > tail -f /nfsmnt/dir/file &
> > rm -rf /nfsmnt/dir
> > rm -rf /nfsmnt/dir
> > # second removal does not fail, 'tail' process receives ESTALE
>
> Hi Dave,
>
> I'm not sure I understand why we must do the dropping/moving of the
> dentries inside nfs_async_rename_done. Why isn't something like the
> attached patch sufficient?
>
As far as I can tell, it is sufficient.
My solution was overly complex and your refinement is much more elegant.
prev parent reply other threads:[~2013-02-22 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 13:59 [PATCH] nfs: Don't allow NFS silly-renamed files to be deleted, no signal Dave Wysochanski
2013-02-22 12:54 ` David Wysochanski
2013-02-22 18:02 ` Myklebust, Trond
2013-02-22 18:52 ` Jeff Layton
2013-02-22 18:54 ` David Wysochanski [this message]
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=1361559283.19046.842.camel@localhost.localdomain \
--to=dwysocha@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).