[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 094/111] virtiofsd: add man page
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 094/111] virtiofsd: add man page |
Date: |
Thu, 23 Jan 2020 11:58:24 +0000 |
From: Stefan Hajnoczi <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
with additions by:
Signed-off-by: Masayoshi Mizuma <address@hidden>
Reviewed-by: Liam Merwick <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
Makefile | 7 +++
tools/virtiofsd/virtiofsd.texi | 104 +++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+)
create mode 100644 tools/virtiofsd/virtiofsd.texi
diff --git a/Makefile b/Makefile
index 60c35a9dd3..53ffef2e1a 100644
--- a/Makefile
+++ b/Makefile
@@ -353,6 +353,9 @@ DOCS+=$(MANUAL_BUILDDIR)/index.html
ifdef CONFIG_VIRTFS
DOCS+=fsdev/virtfs-proxy-helper.1
endif
+ifdef CONFIG_LINUX
+DOCS+=tools/virtiofsd/virtiofsd.1
+endif
ifdef CONFIG_TRACE_SYSTEMTAP
DOCS+=scripts/qemu-trace-stap.1
endif
@@ -858,6 +861,9 @@ ifdef CONFIG_VIRTFS
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
$(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
endif
+ifdef CONFIG_LINUX
+ $(INSTALL_DATA) tools/virtiofsd/virtiofsd.1 "$(DESTDIR)$(mandir)/man1"
+endif
install-datadir:
$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
@@ -1067,6 +1073,7 @@ qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
qemu-monitor-info.texi
qemu.1: qemu-option-trace.texi
qemu-img.1: qemu-img.texi qemu-option-trace.texi qemu-img-cmds.texi
fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
+tools/virtiofsd/virtiofsd.1: tools/virtiofsd/virtiofsd.texi
qemu-nbd.8: qemu-nbd.texi qemu-option-trace.texi
docs/qemu-block-drivers.7: docs/qemu-block-drivers.texi
docs/qemu-cpu-models.7: docs/qemu-cpu-models.texi
diff --git a/tools/virtiofsd/virtiofsd.texi b/tools/virtiofsd/virtiofsd.texi
new file mode 100644
index 0000000000..d7a2528f7d
--- /dev/null
+++ b/tools/virtiofsd/virtiofsd.texi
@@ -0,0 +1,104 @@
+@example
+@c man begin SYNOPSIS
+@command{virtiofsd} [OPTION]
@option{--socket-path=}@var{path}|@option{--fd=}@var{fdnum} @option{-o
source=}@var{path}
+@c man end
+@end example
+
+@c man begin DESCRIPTION
+
+Share a host directory tree with a guest through a virtio-fs device. This
+program is a vhost-user backend that implements the virtio-fs device. Each
+virtio-fs device instance requires its own virtiofsd process.
+
+This program is designed to work with QEMU's @code{--device vhost-user-fs-pci}
+but should work with any virtual machine monitor (VMM) that supports
+vhost-user. See the EXAMPLES section below.
+
+This program must be run as the root user. Upon startup the program will
+switch into a new file system namespace with the shared directory tree as its
+root. This prevents "file system escapes" due to symlinks and other file
+system objects that might lead to files outside the shared directory. The
+program also sandboxes itself using seccomp(2) to prevent ptrace(2) and other
+vectors that could allow an attacker to compromise the system after gaining
+control of the virtiofsd process.
+
+@c man end
+
+@c man begin OPTIONS
+@table @option
+@item -h, --help
+Print help.
+@item -V, --version
+Print version.
+@item -d, -o debug
+Enable debug output.
+@item --syslog
+Print log messages to syslog instead of stderr.
+@item -o flock|no_flock
+enable/disable flock.
+The default is @var{no_flock}.
+@item -o log_level=@var{level}
+Print only log messages matching @var{level} or more severe. @var{level} is
+one of @code{err}, @code{warn}, @code{info}, or @code{debug}. The default is
+@var{info}.
+@item -o norace
+Disable racy fallback.
+The default is false.
+@item -o posix_lock|no_posix_lock
+Enable/Disable remote posix lock.
+The default is @var{posix_lock}.
+@item -o readdirplus|no_readdirplus
+Enable/Disable readdirplus.
+The default is @var{readdirplus}
+@item -o source=@var{path}
+Share host directory tree located at @var{path}. This option is required.
+@item -o timeout=<number>
+I/O timeout (second).
+The default depends on cache= option.
+@item -o writeback|no_writeback
+Enable/Disable writeback cache. The cache alows the FUSE client
+to buffer and merge write requests.
+The default is @var{no_writeback}.
+@item -o xattr|no_xattr
+Enable/Disable Extended attributes (xattr) of the files and directories.
+The default is @var{no_xattr}.
+@item --socket-path=@var{path}, -o vhost_user_socket=@var{path}
+Listen on vhost-user UNIX domain socket at @var{path}.
+@item --fd=@var{fdnum}
+Accept connections from vhost-user UNIX domain socket file descriptor
@var{fdnum}. The file descriptor must already be listening for connections.
+@item --thread-pool-size=@var{num}
+Restrict the number of worker threads per request queue to @var{num}. The
default is 64.
+@item --cache=@code{none}|@code{auto}|@code{always}
+Select the desired trade-off between coherency and performance. @code{none}
+forbids the FUSE client from caching to achieve best coherency at the cost of
+performance. @code{auto} acts similar to NFS with a 1 second metadata cache
+timeout. @code{always} sets a long cache lifetime at the expense of coherency.
+@end table
+@c man end
+
+@c man begin EXAMPLES
+Export @code{/var/lib/fs/vm001/} on vhost-user UNIX domain socket
@code{/var/run/vm001-vhost-fs.sock}:
+
+@example
+host# virtiofsd --socket-path=/var/run/vm001-vhost-fs.sock -o
source=/var/lib/fs/vm001
+host# qemu-system-x86_64 \
+ -chardev socket,id=char0,path=/var/run/vm001-vhost-fs.sock \
+ -device vhost-user-fs-pci,chardev=char0,tag=myfs \
+ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
+ -numa node,memdev=mem \
+ ...
+guest# mount -t virtio_fs myfs /mnt
+@end example
+@c man end
+
+@ignore
+@setfilename virtiofsd
+@settitle QEMU virtio-fs shared file system daemon
+
+@c man begin COPYRIGHT
+Copyright (C) 2019-2020 Red Hat, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+@c man end
+@end ignore
--
2.24.1
- [PULL 071/111] virtiofsd: passthrough_ll: control readdirplus, (continued)
- [PULL 071/111] virtiofsd: passthrough_ll: control readdirplus, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 084/111] virtiofsd: enable PARALLEL_DIROPS during INIT, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 093/111] libvhost-user: Fix some memtable remap cases, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 092/111] virtiofsd: rename inode->refcount to inode->nlookup, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 098/111] virtiofsd: convert more fprintf and perror to use fuse log infra, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 097/111] virtiofsd: do not always set FUSE_FLOCK_LOCKS, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 099/111] virtiofsd: Reset O_DIRECT flag during file open, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 100/111] virtiofsd: Fix data corruption with O_APPEND write in writeback mode, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 102/111] virtiofsd: add definition of fuse_buf_writev(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 106/111] virtiofsd: fix lo_destroy() resource leaks, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 094/111] virtiofsd: add man page,
Dr. David Alan Gilbert (git) <=
- [PULL 109/111] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 110/111] virtiofsd: stop all queue threads on exit in virtio_loop(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 108/111] virtiofsd: Convert lo_destroy to take the lo->mutex lock itself, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 105/111] virtiofsd: prevent FUSE_INIT/FUSE_DESTROY races, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 104/111] virtiofsd: process requests in a thread pool, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 111/111] virtiofsd: add some options to the help message, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 096/111] virtiofsd: introduce inode refcount to prevent use-after-free, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 103/111] virtiofsd: use fuse_buf_writev to replace fuse_buf_write for better performance, Dr. David Alan Gilbert (git), 2020/01/23