fix(slayerfs): unify session usage in unprivileged mount#575
Open
Ivanbeethoven wants to merge 3 commits intork8s-dev:mainfrom
Open
fix(slayerfs): unify session usage in unprivileged mount#575Ivanbeethoven wants to merge 3 commits intork8s-dev:mainfrom
Ivanbeethoven wants to merge 3 commits intork8s-dev:mainfrom
Conversation
Signed-off-by: Luxian <lux1an@qq.com>
7e9c07a to
8a0e5d2
Compare
Signed-off-by: Luxian <lux1an@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Notifyhandle from the FUSESession/MountHandleinto the VFS layer so async operations can trigger cache invalidation without tight coupling.Description
MountHandlecarry anotify: Notifyand addedMountHandle::notify()to return a clonable notifier.Session::notify()public (replacingget_notify) and switched internal uses (e.g.handle_poll) to call the public method.slayerfs::mount_vfs_unprivileged, create theSessionfirst and callfs.set_fuse_notify(session.notify()).awaitso the VFS receives the notifier before mounting.fuse_notify: Arc<RwLock<Option<FuseNotify>>>toVFSand initialized it in the constructor, plusset_fuse_notifyto store the notifier.VFS::invalidate_entry_cache(parent, name)andVFS::invalidate_inode_cache(inode)which call into the storedNotifywhen present.invalidate_entry_cacheorinvalidate_inode_cachein FUSE operation handlers that mutate namespace or metadata (setattr,mkdir,create,link,symlink,unlink,rmdir,rename) so kernel caches are invalidated after successful changes.RwLock) and small control-flow fixes to returnOk(())where appropriate after performing invalidations.Testing
cargo build --workspaceto verify compilation; build succeeded.cargo test -p slayerfs; tests passed locally.cargo test -p rfuse3; tests passed locally.link to #551
Codex Task