linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Konstantin Khlebnikov <koct9i@gmail.com>,
	linux-unionfs@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC][PATH 4/4] ovl: relax lock_rename when moving files between work and upper dir
Date: Fri, 11 Nov 2016 01:11:16 +0200	[thread overview]
Message-ID: <CAOQ4uxiW=FjRoAaumkjA=5b83rr3Cfu=Yk5nqsDx-qCenHGu3A@mail.gmail.com> (raw)
In-Reply-To: <20161110230557.GM19539@ZenIV.linux.org.uk>

On Fri, Nov 11, 2016 at 1:05 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Thu, Nov 10, 2016 at 11:02:21PM +0000, Al Viro wrote:
>> On Fri, Nov 11, 2016 at 12:44:43AM +0200, Amir Goldstein wrote:
>> > If work dir and upper dir have a common parent, then it
>> > is safe to move files between them without taking the super block
>> > s_vfs_rename_mutex.
>> >
>> > Since both upper dir and work dir (as well as $workdir/work)
>> > are delete locked on overlay mount, they cannot be moved.
>>
>> Do explain.  What do you mean, "delete locked" and why exactly can't they
>> be moved?
>

That is explained in commit message of the first 2 patches, but
foremost I would like to say that the name "delete locked" is just the
best of all the bad choices for names I came up with, so I am expecting
better name suggestions.

The concept is to pin the entry so that it cannot be moved, so can have
certain guaranties about the stability of the directories topology.

> More specifically, what makes you think that may_delete() is called before
> any change of parent?

Because it is checked at the beginning of vfs_rename()
and in order to change a parent, an entry needs to be renamed. no?
What am I missing?

  reply	other threads:[~2016-11-10 23:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 22:44 [RFC][PATH 0/4] Reduce excessive use of lock_rename() in overlayfs Amir Goldstein
2016-11-10 22:44 ` [RFC][PATH 1/4] vfs: reinterpret sillyrename flag as delete lock Amir Goldstein
2016-11-10 22:44 ` [RFC][PATH 2/4] vfs: introduce delete trylock/unlock Amir Goldstein
2016-11-10 22:44 ` [RFC][PATH 3/4] ovl: delete lock upper dir and work dir Amir Goldstein
2016-11-10 22:44 ` [RFC][PATH 4/4] ovl: relax lock_rename when moving files between work and upper dir Amir Goldstein
2016-11-10 23:02   ` Al Viro
2016-11-10 23:05     ` Al Viro
2016-11-10 23:11       ` Amir Goldstein [this message]
2016-11-10 23:17         ` Al Viro
2016-11-10 23:33           ` Amir Goldstein
2016-11-10 23:54             ` Al Viro
2016-11-11  0:11               ` Amir Goldstein
2016-11-11  0:27                 ` Al Viro
2016-11-11 14:43                   ` Amir Goldstein
2016-11-11 15:40                     ` Al Viro
2016-11-11 16:17                       ` Amir Goldstein
2016-11-11 17:27                         ` Al Viro
2016-11-11 17:44                           ` Miklos Szeredi
2017-01-12  5:42                             ` Amir Goldstein
2017-01-12 10:00                               ` Miklos Szeredi
2017-01-12 18:18                                 ` Amir Goldstein
2016-11-11 18:07                           ` Amir Goldstein
2016-11-12 19:45                             ` Amir Goldstein

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='CAOQ4uxiW=FjRoAaumkjA=5b83rr3Cfu=Yk5nqsDx-qCenHGu3A@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=koct9i@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@zeniv.linux.org.uk \
    /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).