public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Guoyu Ou <benogy@gmail.com>, linux-bcachefs@vger.kernel.org
Subject: Re: [PATCH] bcachefs: unlock parent dir if entry is not found in subvolume deletion
Date: Mon, 29 Jan 2024 03:15:17 +0000	[thread overview]
Message-ID: <20240129031517.GA26059@ZenIV> (raw)
In-Reply-To: <20240129022338.GH2087318@ZenIV>

On Mon, Jan 29, 2024 at 02:23:38AM +0000, Al Viro wrote:
> On Sun, Jan 28, 2024 at 09:21:48PM -0500, Kent Overstreet wrote:
> 
> > How do we feel about the following?
> 
> No, with side of Fuck, NO.

To elaborate a bit: that essentially introduces a new type (mount/dentry
pair, possibly locked) *and* converts existing instances of struct path
(file->f_path, mount->mnt_mountpoint, etc.) to that.  Suddenly we get
an extra constraint that needs to be verified - "no long-term struct
path instance with ->locked being true".  What's more, currently
one can do
	v = *p;
	path_get(&v);
	...
	path_put(&v);
with eventual
	path_put(p);
possibly from another thread.  Every place like that needs a proof that
we can't possibly get there with p->locked being true.

There's a lot of other reasons why that's a really bad idea.  Seriously,
let's not go there.

  reply	other threads:[~2024-01-29  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28  8:46 [PATCH] bcachefs: unlock parent dir if entry is not found in subvolume deletion Guoyu Ou
2024-01-29  2:21 ` Kent Overstreet
2024-01-29  2:23   ` Al Viro
2024-01-29  3:15     ` Al Viro [this message]
2024-01-29  2:30   ` Al Viro

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=20240129031517.GA26059@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=benogy@gmail.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@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