linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Prevent re-use of FUSE block-device-based superblock after force unmount
@ 2022-07-27  6:44 Daniil Lunev
  2022-07-27  6:44 ` [PATCH v5 1/2] fs/super: function to prevent re-use of block-device-based superblocks Daniil Lunev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniil Lunev @ 2022-07-27  6:44 UTC (permalink / raw)
  To: Miklos Szeredi, Alexander Viro
  Cc: linux-fsdevel, fuse-devel, Christoph Hellwig, linux-kernel,
	Daniil Lunev

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.

Changes in v5:
- Update commit messages to specify that only block-device-based
  superblocks are affected
- Restrict retire_super call in FUSE to be issued for fuseblk only.

Changes in v4:
- Simplify condition according to Christoph Hellwig's comments.

Changes in v3:
- Back to state tracking from v1
- Use s_iflag to mark superblocked ignored
- Only unregister private bdi in retire, without freeing

Changes in v2:
- Remove super from list of superblocks instead of using a flag

Daniil Lunev (2):
  fs/super: function to prevent re-use of block-device-based superblocks
  FUSE: Retire block-device-based superblock on force unmount

 fs/fuse/inode.c    | 10 ++++++++--
 fs/super.c         | 32 ++++++++++++++++++++++++++++++--
 include/linux/fs.h |  2 ++
 3 files changed, 40 insertions(+), 4 deletions(-)

-- 
2.31.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-27  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27  6:44 [PATCH v5 0/2] Prevent re-use of FUSE block-device-based superblock after force unmount Daniil Lunev
2022-07-27  6:44 ` [PATCH v5 1/2] fs/super: function to prevent re-use of block-device-based superblocks Daniil Lunev
2022-07-27  6:44 ` [PATCH v5 2/2] FUSE: Retire block-device-based superblock on force unmount Daniil Lunev
2022-07-27  9:31 ` [PATCH v5 0/2] Prevent re-use of FUSE block-device-based superblock after " Miklos Szeredi

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).