[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241223050829.GJ1977892@ZenIV>
Date: Mon, 23 Dec 2024 05:08:29 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/11] VFS: add _shared versions of the various directory
modifying inode_operations
On Fri, Dec 20, 2024 at 01:54:20PM +1100, NeilBrown wrote:
> i_rwsem *may* be held exclusively or *may* be held shared, in which case
> an exclusive lock will be held on the dentry - provided by a later
> patch.
>
> This will allow a graceful transition from exclusive to shared locking
> for directory updates.
> +A "mixed" lock means that either that i_rwsem on the directory is held
> +exclusively, or it is held as a shared lock, and an exclusive lock is held
> +on the dentry in that directory.
... it also means that ->d_parent and ->d_name are completely unstable.
Yes, really - have rmdir victim moved around on server, then look it up
in a new place and you'll get __d_unalias() move the existing dentry
to new location right under you.
Powered by blists - more mailing lists