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

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Thu Jan 27 16:33:22 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.

This MR is an alternative to !73.
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/79




More information about the Virtio-fs mailing list