Changes:
- Christian Schoenebeck is now co-maintainer for 9pfs - relax checks for O_NOATIME - minor documentation updates -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAl68790ACgkQcdTV5YIv c9Z55RAAhhOZJJ7uNJ5Yohu3hWmkl0gXpeBYTk/L1S0/rv2gBhdqNQcqIjGHXvJj FIDJ/+BMKZjLQuzwIlwqzOB6mu8Wh9jGTujJpSWpusdaWFAYKtY1O6pw1VqhkYuC T5gV4VorvxJNZn6ra6XMRnkecFCdmrgjZbF5W55TmptgwfJj3kwSa/uNg6GE31S6 /WKGibSyKFsk6dkmfqyMEn7skHRrUAxhLGGc85robzkzpNg6peBBdXwgObR1uyF2 fcnau/GDth7Ocys6JG0Oh+s4fWBMwCPUxHms7Vh5CYeqx49EmLnvWMDOGJGPqB8S bE34Q+0G2/BSjNQNAgtiTfFnqdzLuFbvAhc384oj1LfN0IneGhhs4VEsSYUg4fQ9 si5cfc/v6MKFaTmQWcs9XJMkRfBHFpD9ryUzugsIpYdvS55tRwUPuVTTumV8SIxV uZmXELROQ01t5xompnUbWCSM7QqocQLHG6uUb3OI9htAEl3ex1FYVo//qjEeoPDi Im3SJKaTNI84OIZN27O9OwNEP3wGluSCMpBKmBkMdQoxWwWgLbvHJEqxNJmpcM94 odQiMAoH75yj6fATW9HcDmNkmKM+nYYbSC734sjrikFbS/HtTRmccqOetZtDowHg cBWyhi5RtJTWPe9EVUrv6nPnDoyGcD89ibVaPd8yDxKT1QUTjEQ= =A998 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-05-14' into staging Changes: - Christian Schoenebeck is now co-maintainer for 9pfs - relax checks for O_NOATIME - minor documentation updates # gpg: Signature made Thu 14 May 2020 08:14:37 BST # gpg: using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full] # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" [full] # gpg: aka "[jpeg image of size 3330]" [full] # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/9p-next-2020-05-14: xen-9pfs: Fix log messages of reply errors 9pfs: local: ignore O_NOATIME if we don't have permissions qemu-options.hx: 9p: clarify -virtfs vs. -fsdev MAINTAINERS: Upgrade myself as 9pfs co-maintainer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
035b448b84
|
@ -1657,7 +1657,7 @@ F: include/sysemu/balloon.h
|
|||
|
||||
virtio-9p
|
||||
M: Greg Kurz <groug@kaod.org>
|
||||
R: Christian Schoenebeck <qemu_oss@crudebyte.com>
|
||||
M: Christian Schoenebeck <qemu_oss@crudebyte.com>
|
||||
S: Odd Fixes
|
||||
F: hw/9pfs/
|
||||
X: hw/9pfs/xen-9p*
|
||||
|
|
|
@ -37,9 +37,22 @@ static inline int openat_file(int dirfd, const char *name, int flags,
|
|||
{
|
||||
int fd, serrno, ret;
|
||||
|
||||
again:
|
||||
fd = openat(dirfd, name, flags | O_NOFOLLOW | O_NOCTTY | O_NONBLOCK,
|
||||
mode);
|
||||
if (fd == -1) {
|
||||
if (errno == EPERM && (flags & O_NOATIME)) {
|
||||
/*
|
||||
* The client passed O_NOATIME but we lack permissions to honor it.
|
||||
* Rather than failing the open, fall back without O_NOATIME. This
|
||||
* doesn't break the semantics on the client side, as the Linux
|
||||
* open(2) man page notes that O_NOATIME "may not be effective on
|
||||
* all filesystems". In particular, NFS and other network
|
||||
* filesystems ignore it entirely.
|
||||
*/
|
||||
flags &= ~O_NOATIME;
|
||||
goto again;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,8 @@ static ssize_t xen_9pfs_pdu_vmarshal(V9fsPDU *pdu,
|
|||
ret = v9fs_iov_vmarshal(in_sg, num, offset, 0, fmt, ap);
|
||||
if (ret < 0) {
|
||||
xen_pv_printf(&xen_9pfs->xendev, 0,
|
||||
"Failed to encode VirtFS request type %d\n", pdu->id + 1);
|
||||
"Failed to encode VirtFS reply type %d\n",
|
||||
pdu->id + 1);
|
||||
xen_be_set_state(&xen_9pfs->xendev, XenbusStateClosing);
|
||||
xen_9pfs_disconnect(&xen_9pfs->xendev);
|
||||
}
|
||||
|
@ -201,9 +202,9 @@ static void xen_9pfs_init_in_iov_from_pdu(V9fsPDU *pdu,
|
|||
|
||||
buf_size = iov_size(ring->sg, num);
|
||||
if (buf_size < P9_IOHDRSZ) {
|
||||
xen_pv_printf(&xen_9pfs->xendev, 0, "Xen 9pfs request type %d"
|
||||
"needs %zu bytes, buffer has %zu, less than minimum\n",
|
||||
pdu->id, *size, buf_size);
|
||||
xen_pv_printf(&xen_9pfs->xendev, 0, "Xen 9pfs reply type %d needs "
|
||||
"%zu bytes, buffer has %zu, less than minimum\n",
|
||||
pdu->id + 1, *size, buf_size);
|
||||
xen_be_set_state(&xen_9pfs->xendev, XenbusStateClosing);
|
||||
xen_9pfs_disconnect(&xen_9pfs->xendev);
|
||||
}
|
||||
|
|
|
@ -1542,9 +1542,17 @@ SRST
|
|||
``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly]``
|
||||
\
|
||||
``-virtfs synth,mount_tag=mount_tag``
|
||||
Define a new filesystem device and expose it to the guest using a
|
||||
virtio-9p-device. The general form of a Virtual File system
|
||||
pass-through options are:
|
||||
Define a new virtual filesystem device and expose it to the guest using
|
||||
a virtio-9p-device (a.k.a. 9pfs), which essentially means that a certain
|
||||
directory on host is made directly accessible by guest as a pass-through
|
||||
file system by using the 9P network protocol for communication between
|
||||
host and guests, if desired even accessible, shared by several guests
|
||||
simultaniously.
|
||||
|
||||
Note that ``-virtfs`` is actually just a convenience shortcut for its
|
||||
generalized form ``-fsdev -device virtio-9p-pci``.
|
||||
|
||||
The general form of pass-through file system options are:
|
||||
|
||||
``local``
|
||||
Accesses to the filesystem are done by QEMU.
|
||||
|
|
Loading…
Reference in a new issue