aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-11-02 17:18:57 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-11-02 19:22:51 +0000
commit9d82f6a3e68c2986633ad11687da2193e9acb0cb (patch)
tree463f082d36d7351cef563d740a0e1a9a47f52410 /net
parentd672fce6baa0a02dfa64d717fb072c06e301d695 (diff)
downloadqemu-9d82f6a3e68c2986633ad11687da2193e9acb0cb.zip
qemu-9d82f6a3e68c2986633ad11687da2193e9acb0cb.tar.gz
qemu-9d82f6a3e68c2986633ad11687da2193e9acb0cb.tar.bz2
virtiofsd: Announce sub-mount points
Whenever we encounter a directory with an st_dev or mount ID that differs from that of its parent, we set the FUSE_ATTR_SUBMOUNT flag so the guest can create a submount for it. We only need to do so in lo_do_lookup(). The following functions return a fuse_attr object: - lo_create(), though fuse_reply_create(): Calls lo_do_lookup(). - lo_lookup(), though fuse_reply_entry(): Calls lo_do_lookup(). - lo_mknod_symlink(), through fuse_reply_entry(): Calls lo_do_lookup(). - lo_link(), through fuse_reply_entry(): Creating a link cannot create a submount, so there is no need to check for it. - lo_getattr(), through fuse_reply_attr(): Announcing submounts when the node is first detected (at lookup) is sufficient. We do not need to return the submount attribute later. - lo_do_readdir(), through fuse_add_direntry_plus(): Calls lo_do_lookup(). Make announcing submounts optional, so submounts are only announced to the guest with the announce_submounts option. Some users may prefer the current behavior, so that the guest learns nothing about the host mount structure. (announce_submounts is force-disabled when the guest does not present the FUSE_SUBMOUNTS capability, or when there is no statx().) Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201102161859.156603-6-mreitz@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions