From: "NeilBrown" <neilb@suse.de>
To: "Al Viro" <viro@zeniv.linux.org.uk>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Daire Byrne" <daire@dneg.com>,
"Trond Myklebust" <trond.myklebust@hammerspace.com>,
"Chuck Lever" <chuck.lever@oracle.com>,
"Linux NFS Mailing List" <linux-nfs@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/10] VFS: support concurrent renames.
Date: Mon, 29 Aug 2022 13:08:58 +1000 [thread overview]
Message-ID: <166174253873.27490.14474856398076056074@noble.neil.brown.name> (raw)
In-Reply-To: <YwmZveDR7Igur0m0@ZenIV>
On Sat, 27 Aug 2022, Al Viro wrote:
> On Fri, Aug 26, 2022 at 12:10:43PM +1000, NeilBrown wrote:
> > Allow object can now be renamed from or to a directory in which a create
> > or unlink is concurrently happening.
> >
> > Two or more renames with the one directory can also be concurrent.
> > s_vfs_rename_mutex still serialises lookups for cross-directory renames,
> > but the renames themselves can proceed concurrently.
>
> Wha...? <checks>
> Not true, fortunately - you *do* hold ->s_vfs_rename_mutex over the
> rename itself. If not for that, it would be utterly broken.
> And I don't care for NFS server rejecting that - we are *NOT* taking
> loop prevention logics into every filesystem. It's highly non-local
> and trying to handle it with your per-dentry flags is going to be
> painful as hell, if at all possible.
>
I don't know what happened there - I let myself get confused somewhere
in the process. You are of course right that s_vfs_rename_mutex is held
the whole time. I wasn't intending to try to change that.
> > + if (d1 < d2) {
> > + ok1 = d_lock_update_nested(d1, p1, last1, I_MUTEX_PARENT);
> > + ok2 = d_lock_update_nested(d2, p2, last2, I_MUTEX_PARENT2);
> > + } else {
> > + ok2 = d_lock_update_nested(d2, p2, last2, I_MUTEX_PARENT);
> > + ok1 = d_lock_update_nested(d1, p1, last1, I_MUTEX_PARENT2);
> > + }
>
> Explain, please. What's that ordering about?
>
Deadlock avoidance, just like in the same-directory case.
But I guess as s_vfs_rename_mutex is held, ordering cannot matter.
I'll remove the ordering.
Thanks,
NeilBrown
next prev parent reply other threads:[~2022-08-29 3:10 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 2:10 [PATCH/RFC 00/10 v5] Improve scalability of directory operations NeilBrown
2022-08-26 2:10 ` [PATCH 09/10] VFS: add LOOKUP_SILLY_RENAME NeilBrown
2022-08-27 1:21 ` Al Viro
2022-08-29 3:15 ` NeilBrown
2022-08-26 2:10 ` [PATCH 01/10] VFS: support parallel updates in the one directory NeilBrown
2022-08-26 19:06 ` Linus Torvalds
2022-08-26 23:06 ` NeilBrown
2022-08-27 0:13 ` Linus Torvalds
2022-08-27 0:23 ` Al Viro
2022-08-27 21:14 ` Al Viro
2022-08-27 0:17 ` Al Viro
2022-09-01 0:31 ` NeilBrown
2022-09-01 3:44 ` Al Viro
2022-08-27 3:43 ` Al Viro
2022-08-29 1:59 ` NeilBrown
2022-09-03 0:06 ` Al Viro
2022-09-03 1:40 ` NeilBrown
2022-09-03 2:12 ` Al Viro
2022-09-03 17:52 ` Al Viro
2022-09-04 23:33 ` NeilBrown
2022-08-26 2:10 ` [PATCH 08/10] NFSD: allow parallel creates from nfsd NeilBrown
2022-08-27 4:37 ` Al Viro
2022-08-29 3:12 ` NeilBrown
2022-08-26 2:10 ` [PATCH 05/10] VFS: export done_path_update() NeilBrown
2022-08-26 2:10 ` [PATCH 02/10] VFS: move EEXIST and ENOENT tests into lookup_hash_update() NeilBrown
2022-08-26 2:10 ` [PATCH 06/10] VFS: support concurrent renames NeilBrown
2022-08-27 4:12 ` Al Viro
2022-08-29 3:08 ` NeilBrown [this message]
2022-08-26 2:10 ` [PATCH 10/10] NFS: support parallel updates in the one directory NeilBrown
2022-08-26 15:31 ` John Stoffel
2022-08-26 23:13 ` NeilBrown
2022-08-26 2:10 ` [PATCH 03/10] VFS: move want_write checks into lookup_hash_update() NeilBrown
2022-08-27 3:48 ` Al Viro
2022-08-26 2:10 ` [PATCH 04/10] VFS: move dput() and mnt_drop_write() into done_path_update() NeilBrown
2022-08-26 2:10 ` [PATCH 07/10] VFS: hold DCACHE_PAR_UPDATE lock across d_revalidate() NeilBrown
2022-08-26 14:42 ` [PATCH/RFC 00/10 v5] Improve scalability of directory operations John Stoffel
2022-08-26 23:30 ` NeilBrown
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=166174253873.27490.14474856398076056074@noble.neil.brown.name \
--to=neilb@suse.de \
--cc=chuck.lever@oracle.com \
--cc=daire@dneg.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trond.myklebust@hammerspace.com \
--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).