Skip to content

Conversation

sidneychang
Copy link
Contributor

This PR includes two related improvements to better support multi-filesystem
mounting scenarios on fuse, especially during unmount operations:

  1. Add notify_inval_inode support in fusedev, enabling user space to
    explicitly notify the kernel to invalidate inode page caches. This helps
    clear caches properly after unmounting.

  2. Extend the VFS method get_rootfs to return both the mounted backend
    filesystem (Arc) and its associated filesystem index
    (fs_idx). Although multi-filesystem mounting is already supported,
    returning fs_idx is necessary for proper unmount handling and cache
    invalidation.

The implementation follows fuse kernel and libfuse protocols and maintains
compatibility with existing patterns like notify_inval_entry.

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@sidneychang sidneychang force-pushed the notify-inval-inode-and-get-rootfs-fsidx branch 2 times, most recently from c093957 to a25fdc0 Compare August 13, 2025 11:33
…ount

- Add notify_inval_inode method to fusedev to explicitly invalidate inode caches
  in the kernel, ensuring cache coherence when backend files change outside guest VFS.

- Extend get_rootfs to return both Arc<BackFileSystem> and u8 fs_idx.
  This is necessary for correct unmount handling and cache invalidation.

The implementation follows fuse kernel and libfuse protocols and maintains
compatibility with existing patterns like notify_inval_entry.

Signed-off-by: sidneychang <2190206983@qq.com>
@sidneychang sidneychang force-pushed the notify-inval-inode-and-get-rootfs-fsidx branch from a25fdc0 to a29fec8 Compare August 15, 2025 03:03
@imeoer imeoer merged commit 93df9d2 into cloud-hypervisor:master Aug 16, 2025
10 checks passed
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