[Virtio-fs] [virtiofsd] MR opened: mount_fd: Manually manage mount file descriptors

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Wed Jan 26 19:24:38 UTC 2022


Still we have a hash map of all existing mount FDs. But instead of
refcounting mount FDs and letting them remove themselves from the
map, we manually

- add a mount FD when the (sub)mount inode is looked up, and
- remove a mount FD when the (sub)mount inode is forgotten.

When later implementing FUSE_SYNCFS for the case without
--announce-submounts, we need to defer removing mount FDs until
syncfs was called by them. This can be done by either (a) calling
syncfs on any mount FD that is about to be removed, or (b) keeping
them until the client calls syncfs. Both ways ((a) or (b)) are
easier to implement on top of the manual management introduced
in this commit.
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/79




More information about the Virtio-fs mailing list