[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/12] virtiofsd: Check FUSE_SUBMOUNTS
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 06/12] virtiofsd: Check FUSE_SUBMOUNTS |
Date: |
Mon, 2 Nov 2020 19:56:51 +0000 |
From: Max Reitz <mreitz@redhat.com>
FUSE_SUBMOUNTS is a pure indicator by the kernel to signal that it
supports submounts. It does not check its state in the init reply, so
there is nothing for fuse_lowlevel.c to do but to check its existence
and copy it into fuse_conn_info.capable.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20201102161859.156603-2-mreitz@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
tools/virtiofsd/fuse_common.h | 7 +++++++
tools/virtiofsd/fuse_lowlevel.c | 3 +++
2 files changed, 10 insertions(+)
diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 686c42c0a5..5aee5193eb 100644
--- a/tools/virtiofsd/fuse_common.h
+++ b/tools/virtiofsd/fuse_common.h
@@ -352,6 +352,13 @@ struct fuse_file_info {
*/
#define FUSE_CAP_NO_OPENDIR_SUPPORT (1 << 24)
+/**
+ * Indicates that the kernel supports the FUSE_ATTR_SUBMOUNT flag.
+ *
+ * Setting (or unsetting) this flag in the `want` field has *no effect*.
+ */
+#define FUSE_CAP_SUBMOUNTS (1 << 27)
+
/**
* Ioctl flags
*
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index 4d1ba2925d..370222339b 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -1988,6 +1988,9 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid,
bufsize = max_bufsize;
}
}
+ if (arg->flags & FUSE_SUBMOUNTS) {
+ se->conn.capable |= FUSE_CAP_SUBMOUNTS;
+ }
#ifdef HAVE_SPLICE
#ifdef HAVE_VMSPLICE
se->conn.capable |= FUSE_CAP_SPLICE_WRITE | FUSE_CAP_SPLICE_MOVE;
--
2.28.0
- [PULL 00/12] migration queue, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 02/12] migration: Postpone the kick of the fault thread after recover, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 03/12] virtiofsd: Seccomp: Add 'send' for syslog, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 01/12] migration: Unify reset of last_rb on destination node when recover, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 05/12] virtiofsd: Fix the help message of posix lock, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 04/12] tools/virtiofsd: Check vu_init() return value (CID 1435958), Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 06/12] virtiofsd: Check FUSE_SUBMOUNTS,
Dr. David Alan Gilbert (git) <=
- [PULL 07/12] virtiofsd: Add attr_flags to fuse_entry_param, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 08/12] meson.build: Check for statx(), Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 09/12] virtiofsd: Add mount ID to the lo_inode key, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 10/12] virtiofsd: Announce sub-mount points, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 11/12] tests/acceptance/boot_linux: Accept SSH pubkey, Dr. David Alan Gilbert (git), 2020/11/02
- [PULL 12/12] tests/acceptance: Add virtiofs_submounts.py, Dr. David Alan Gilbert (git), 2020/11/02
- Re: [PULL 00/12] migration queue, Peter Maydell, 2020/11/03