diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-03-03 15:20:12 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-03-03 15:20:12 +0000 |
| commit | abfa865014ab17941eb1fcb7cc2fa293a25843c4 (patch) | |
| tree | b434c62919409565efd51d4840291abed6150857 /tools/virtiofsd/fuse_virtio.c | |
| parent | 104933c4a973960dea605b06fcd5d0d478255d77 (diff) | |
| parent | bdfd66788349acc43cd3f1298718ad491663cfcc (diff) | |
| download | focaccia-qemu-abfa865014ab17941eb1fcb7cc2fa293a25843c4.tar.gz focaccia-qemu-abfa865014ab17941eb1fcb7cc2fa293a25843c4.zip | |
Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20200303' into staging
Virtiofsd pull 2020-03-03 xattr fixes from Misono. # gpg: Signature made Tue 03 Mar 2020 15:15:04 GMT # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert-gitlab/tags/pull-virtiofs-20200303: virtiofsd: Fix xattr operations virtiofsd: passthrough_ll: cleanup getxattr/listxattr Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tools/virtiofsd/fuse_virtio.c')
| -rw-r--r-- | tools/virtiofsd/fuse_virtio.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index dd1c605dbf..3b6d16a041 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -426,6 +426,8 @@ err: return ret; } +static __thread bool clone_fs_called; + /* Process one FVRequest in a thread pool */ static void fv_queue_worker(gpointer data, gpointer user_data) { @@ -441,6 +443,17 @@ static void fv_queue_worker(gpointer data, gpointer user_data) assert(se->bufsize > sizeof(struct fuse_in_header)); + if (!clone_fs_called) { + int ret; + + /* unshare FS for xattr operation */ + ret = unshare(CLONE_FS); + /* should not fail */ + assert(ret == 0); + + clone_fs_called = true; + } + /* * An element contains one request and the space to send our response * They're spread over multiple descriptors in a scatter/gather set |