fuse: Mirror virtio-fs submounts
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | fuse: Add fuse_attr.flagsinclude/ | +1 | 1 reply | |
| 2/9 | fuse: Add FUSE_ATTR_SUBMOUNTinclude/ | +7 | 4 replies | |
| 3/9 | fuse: Add FUSE_ATTR_FLAGSinclude/ | +2 | 1 reply | |
| 4/9 | fuse: Announce FUSE_ATTR_FLAGSfs/ fs/ | +7 | 1 reply | |
| 5/9 | fuse: Store fuse_conn in fuse_reqfs/ fs/ | +10 | 1 reply | |
| 6/9 | fuse: Drop fuse_conn parameter where possiblefs/ fs/ fs/ | +43 | 1 reply | |
| 7/9 | fuse: Split fuse_mount off of fuse_connfs/ fs/ fs/ +6 more | +502 | 2 replies | |
| 8/9 | fuse: Allow fuse_fill_super_common() for submountsfs/ fs/ fs/ | +112 | 0 replies | |
| 9/9 | fuse: Implement crossmountsfs/ fs/ fs/ +1 more | +98 | 0 replies |
Reviews trailers per patch
5 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Stefan Hajnoczi |
|---|---|
| 1/9 | R-b |
| 2/9 | |
| 3/9 | R-b |
| 4/9 | R-b |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Virtio-fs] [PATCH 0/9] fuse: Mirror virtio-fs submounts
RFC: https://www.redhat.com/archives/virtio-fs/2020-May/msg00018.html
Branch: https://github.com/XanClic/linux.git virtiofs-submounts-v2
(Note that there is an accompanying QEMU series
“virtiofsd: Announce submounts to the guest”;
https://www.redhat.com/archives/virtio-fs/2020-September/msg00016.html)
Hi,
When using virtio-fs, we want all nodes that have a unique st_dev/st_ino combination on the host to have such a unique combination in the guest as well. To do so, we introduce a flags field to fuse_attr, where virtiofsd can announce submounts. All such entries are then translated to auto-mounts by the FUSE driver in the guest.
Because this is something that we probably do not want to enable unconditionally for traditional FUSE servers, it is currently limited to virtio-fs.
(For virtio-fs, we can leave the decision of whether to enable this feature or not to virtiofsd, because with it residing on the host, it has higher privileges than the guest anyway.)
For this to do something useful, you need to apply the “virtiofsd:
Announce submounts to the guest” series to qemu (which also provides a test there).
Implementation-wise, this series splits off everything that is superblock-specific from fuse_conn into a new fuse_mount structure, so that a single fuse_conn can have multiple fuse_mounts and thus multiple superblocks. Each submount’s superblock then gets its own anonymous block device so the filesystem receives a unique st_dev value.
Max Reitz (9):
fuse: Add fuse_attr.flags
fuse: Add FUSE_ATTR_SUBMOUNT
fuse: Add FUSE_ATTR_FLAGS
fuse: Announce FUSE_ATTR_FLAGS
fuse: Store fuse_conn in fuse_req
fuse: Drop fuse_conn parameter where possible
fuse: Split fuse_mount off of fuse_conn
fuse: Allow fuse_fill_super_common() for submounts
fuse: Implement crossmounts
fs/fuse/fuse_i.h | 136 ++++++++++++++---- include/uapi/linux/fuse.h | 11 +- fs/fuse/control.c | 28 +++- fs/fuse/dev.c | 161 ++++++++++----------- fs/fuse/dir.c | 198 +++++++++++++++++++------- fs/fuse/file.c | 211 ++++++++++++++-------------- fs/fuse/inode.c | 288 +++++++++++++++++++++++++++++--------- fs/fuse/readdir.c | 10 +- fs/fuse/virtio_fs.c | 73 ++++++---- fs/fuse/xattr.c | 34 ++--- 10 files changed, 765 insertions(+), 385 deletions(-)
Signature · 1 line
2.26.2