77c23f
From 717373379510cd6ecf8c6d0e1aae65edfac4551d Mon Sep 17 00:00:00 2001
77c23f
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
77c23f
Date: Tue, 5 May 2020 16:35:58 +0100
77c23f
Subject: [PATCH 7/9] virtiofsd: Show submounts
77c23f
77c23f
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
77c23f
Message-id: <20200505163600.22956-6-dgilbert@redhat.com>
77c23f
Patchwork-id: 96273
77c23f
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 5/7] virtiofsd: Show submounts
77c23f
Bugzilla: 1817445
77c23f
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
77c23f
RH-Acked-by: Max Reitz <mreitz@redhat.com>
77c23f
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
77c23f
77c23f
From: Max Reitz <mreitz@redhat.com>
77c23f
77c23f
Currently, setup_mounts() bind-mounts the shared directory without
77c23f
MS_REC.  This makes all submounts disappear.
77c23f
77c23f
Pass MS_REC so that the guest can see submounts again.
77c23f
77c23f
Fixes: 5baa3b8e95064c2434bd9e2f312edd5e9ae275dc
77c23f
Signed-off-by: Max Reitz <mreitz@redhat.com>
77c23f
Message-Id: <20200424133516.73077-1-mreitz@redhat.com>
77c23f
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
77c23f
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
77c23f
  Changed Fixes to point to the commit with the problem rather than
77c23f
          the commit that turned it on
77c23f
(cherry picked from commit ace0829c0d08f0e5f1451e402e94495bc2166772)
77c23f
77c23f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
77c23f
---
77c23f
 tools/virtiofsd/passthrough_ll.c | 2 +-
77c23f
 1 file changed, 1 insertion(+), 1 deletion(-)
77c23f
77c23f
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
77c23f
index 73d8405..614ba55 100644
77c23f
--- a/tools/virtiofsd/passthrough_ll.c
77c23f
+++ b/tools/virtiofsd/passthrough_ll.c
77c23f
@@ -2670,7 +2670,7 @@ static void setup_mounts(const char *source)
77c23f
     int oldroot;
77c23f
     int newroot;
77c23f
 
77c23f
-    if (mount(source, source, NULL, MS_BIND, NULL) < 0) {
77c23f
+    if (mount(source, source, NULL, MS_BIND | MS_REC, NULL) < 0) {
77c23f
         fuse_log(FUSE_LOG_ERR, "mount(%s, %s, MS_BIND): %m\n", source, source);
77c23f
         exit(1);
77c23f
     }
77c23f
-- 
77c23f
1.8.3.1
77c23f