Skip to content

reset got_init after handling FUSE_DESTROY message - #910

Merged
bsbernd merged 1 commit into
libfuse:masterfrom
legezywzh:fix_re_mount
Mar 21, 2024
Merged

bsbernd merged 1 commit into
libfuse:masterfrom
legezywzh:fix_re_mount

Conversation

@legezywzh

Copy link
Copy Markdown
Contributor

User may still need to mount same fuse filesystem after umounting it(In this case, the userspace filesystem server needs to keep live), and after handling FUSE_DESTROY message, new FUSE_INIT message may come, so need to reset got_init to be zero.
This change is necessary when exporting existing fuse filesystems as virtiofs devices, users may mount or umount as they wish.

User may still need to mount same fuse filesystem after umounting
it(In this case, the userspace filesystem server needs to keep live),
and after handling FUSE_DESTROY message, new FUSE_INIT message may come,
so need to reset got_init to be zero.

Signed-off-by: Xiaoguang Wang <[email protected]>
@bsbernd
bsbernd merged commit f01d927 into libfuse:master Mar 21, 2024
bsbernd added a commit to bsbernd/libfuse that referenced this pull request Mar 29, 2024
* master: (24 commits)
  Add support for FUSE_CAP_HANDLE_KILLPRIV_V2
  Fix FUSE_CAP_DIRECT_IO_ALLOW_MMAP - use new numerical value
  Install all test/build python packages from requirements.txt
  fix readdirplus when filler is called with zero offset (libfuse#896)
  reset got_init after handling FUSE_DESTROY message (libfuse#910)
  ci-build.sh: Fix checking for function arguments (libfuse#909)
  Add FUSE_FILL_DIR_DEFAULTS enum (libfuse#903)
  Fix example/fix-notify_inval_inode.c (libfuse#908)
  Bump actions/checkout from 4.1.1 to 4.1.2 (libfuse#905)
  Add final "meson setup --reconfigure" to README.md
  /test_ctests / test_notify1: Print cmdline on failure
  Add glibc backtrace to signal handler
  ci-build.sh: Add back test without versioned symbols
  Build clang/sanitized build first
  Fix use-after-free in example/poll.c
  Add back s-bit for compiled fusermount
  Fix test failures: Create missing mount dir
  ci-build.sh: Reduce pytest --maxfail from 99 to 1
  ci-build.sh: Always install and add s-bit for fusermount3
  ci-build.sh: Run ASAN and UBSAN at the same time
  ...
bsbernd added a commit to bsbernd/libfuse that referenced this pull request Feb 20, 2025
* remotes/upstream/master:
  Fix FUSE_CAP_DIRECT_IO_ALLOW_MMAP - use new numerical value
  Install all test/build python packages from requirements.txt
  fix readdirplus when filler is called with zero offset (libfuse#896)
  reset got_init after handling FUSE_DESTROY message (libfuse#910)
  ci-build.sh: Fix checking for function arguments (libfuse#909)
  Add FUSE_FILL_DIR_DEFAULTS enum (libfuse#903)
@bsbernd

bsbernd commented Sep 11, 2025 •

Copy link
Copy Markdown
Collaborator

@legezywzh I would actually like to revert this , see #1326 and #1296 for reasons.

The easiest solution for #1296 is to run single threaded before FUSE_INIT is complete. But that will not work when FUSE_INIT is received multiple times - right now I don't see how that might happen at all. Back when this was commit there was no harm to reset got_init, but in mean time with allowance of larger buffers, it is.

I also do not see at all how, FUSE_INIT could be send again - could you please explain that detail? If that is really needed we would basically needed to switch to single threaded on handling FUSE_DESTROY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants