Commit c8b2bc51 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2019-10-10' into staging



The most notable change is that we now detect cross-device setups in the
host since it may cause inode number collision and mayhem in the guest.
A new fsdev property is added for the user to choose the appropriate
policy to handle that: either remap all inode numbers or fail I/Os to
another host device or just print out a warning (default behaviour).

This is also my last PR as _active_ maintainer of 9pfs.

# gpg: Signature made Thu 10 Oct 2019 12:14:07 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-2019-10-10:
  MAINTAINERS: Downgrade status of virtio-9p to "Odd Fixes"
  9p: Use variable length suffixes for inode remapping
  9p: stat_to_qid: implement slow path
  9p: Added virtfs option 'multidevs=remap|forbid|warn'
  9p: Treat multiple devices on one export as an error
  fsdev: Add return value to fsdev_throttle_parse_opts()
  9p: Simplify error path of v9fs_device_realize_common()
  9p: unsigned type for type, version, path

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 088d6709 e410bbc5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1517,7 +1517,7 @@ F: tests/virtio-balloon-test.c

virtio-9p
M: Greg Kurz <groug@kaod.org>
S: Supported
S: Odd Fixes
F: hw/9pfs/
X: hw/9pfs/xen-9p*
F: fsdev/
+3 −3
Original line number Diff line number Diff line
@@ -9,9 +9,9 @@ typedef struct V9fsString

typedef struct V9fsQID
{
    int8_t type;
    int32_t version;
    int64_t path;
    uint8_t type;
    uint32_t version;
    uint64_t path;
} V9fsQID;

typedef struct V9fsStat
+5 −0
Original line number Diff line number Diff line
@@ -59,6 +59,11 @@ typedef struct ExtendedOps {
#define V9FS_RDONLY                 0x00000040
#define V9FS_PROXY_SOCK_FD          0x00000080
#define V9FS_PROXY_SOCK_NAME        0x00000100
/*
 * multidevs option (either one of the two applies exclusively)
 */
#define V9FS_REMAP_INODES           0x00000200
#define V9FS_FORBID_MULTIDEVS       0x00000400

#define V9FS_SEC_MASK               0x0000003C

+6 −1
Original line number Diff line number Diff line
@@ -31,7 +31,9 @@ static QemuOptsList qemu_fsdev_opts = {
        }, {
            .name = "readonly",
            .type = QEMU_OPT_BOOL,

        }, {
            .name = "multidevs",
            .type = QEMU_OPT_STRING,
        }, {
            .name = "socket",
            .type = QEMU_OPT_STRING,
@@ -75,6 +77,9 @@ static QemuOptsList qemu_virtfs_opts = {
        }, {
            .name = "readonly",
            .type = QEMU_OPT_BOOL,
        }, {
            .name = "multidevs",
            .type = QEMU_OPT_STRING,
        }, {
            .name = "socket",
            .type = QEMU_OPT_STRING,
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static void fsdev_throttle_write_timer_cb(void *opaque)
    qemu_co_enter_next(&fst->throttled_reqs[true], NULL);
}

void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
int fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
{
    throttle_config_init(&fst->cfg);
    fst->cfg.buckets[THROTTLE_BPS_TOTAL].avg =
@@ -75,7 +75,7 @@ void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
    fst->cfg.op_size =
        qemu_opt_get_number(opts, "throttling.iops-size", 0);

    throttle_is_valid(&fst->cfg, errp);
    return throttle_is_valid(&fst->cfg, errp) ? 0 : -1;
}

void fsdev_throttle_init(FsThrottle *fst)
Loading