[PATCHSET 4/9] fuse2fs: refactor unmount code

Darrick J. Wong
2025-11-06T22:28:41Z

Hi all,

In this series, we refactor the code around ext2fs_close to get ready
for iomap mode. The significant part of this series is moving the
unmount code to op_destroy, because we want to release the block device
as a part of the umount(2) process to maintain expected behavior of the
in-kernel local filesystem drivers.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

Comments and questions are, as always, welcome.

e2fsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/e2fsprogs.git/log/?h=fuse2fs-refactor-unmounting
---
Commits in this patchset:
* fuse2fs: get rid of the global_fs variable
* fuse2fs: hoist lockfile code
* fuse2fs: hoist unmount code from main
---
misc/fuse2fs.c | 195 ++++++++++++++++++++++++++++++--------------------------
1 file changed, 106 insertions(+), 89 deletions(-)