mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniil Lunev <dlunev@chromium.org>
To: linux-fsdevel@vger.kernel.org
Cc: fuse-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	Daniil Lunev <dlunev@chromium.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: [PATCH 0/2] Prevent re-use of FUSE superblock after force unmount
Date: Wed, 11 May 2022 11:30:55 +1000	[thread overview]
Message-ID: <20220511013057.245827-1-dlunev@chromium.org> (raw)

Force unmount of fuse severes the connection between FUSE driver and its
userspace counterpart. However, open file handles will prevent the
superblock from being reclaimed. An attempt to remount the filesystem at
the same endpoint will try re-using the superblock, if still present.
Since the superblock re-use path doesn't go through the fs-specific
superblock setup code, its state in FUSE case is already disfunctional,
and that will prevent the mount from succeeding.
The patchset adds a possibility to mark the superblock  "defunc", which
will prevent its re-use by the subsequent mounts, and uses the
functionality in FUSE driver.


Daniil Lunev (2):
  fs/super: Add a flag to mark super block defunc
  FUSE: Mark super block defunc on force unmount

 fs/fuse/inode.c    | 11 +++++++++--
 fs/super.c         |  4 ++--
 include/linux/fs.h |  1 +
 3 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.31.0


             reply	other threads:[~2022-05-11  1:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  1:30 Daniil Lunev [this message]
2022-05-11  1:30 ` [PATCH 1/2] fs/super: Add a flag to mark super block defunc Daniil Lunev
2022-05-11 14:50   ` Theodore Ts'o
2022-05-11 14:54   ` Christoph Hellwig
2022-05-11 21:33     ` Daniil Lunev
2022-05-11  1:30 ` [PATCH 2/2] FUSE: Mark super block defunc on force unmount Daniil Lunev
2022-05-11  7:07 ` [PATCH 0/2] Prevent re-use of FUSE superblock after " Miklos Szeredi
2022-05-11  7:36   ` Daniil Lunev
2022-05-11  7:54     ` Miklos Szeredi
2022-05-11  9:37       ` Daniil Lunev
2022-05-11 10:34         ` Miklos Szeredi
2022-05-11 11:19           ` Daniil Lunev
2022-05-11 11:38             ` Bernd Schubert
2022-05-11 12:28             ` Miklos Szeredi
2022-05-11 13:05               ` Daniil Lunev

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=20220511013057.245827-1-dlunev@chromium.org \
    --to=dlunev@chromium.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®