[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/4] add support for QEMU 9pfs 'multidevs' option

From: Christian Schoenebeck
Subject: [PATCH v2 0/4] add support for QEMU 9pfs 'multidevs' option
Date: Fri, 20 Mar 2020 18:01:02 +0100

QEMU 4.2 added a new option 'multidevs' for 9pfs. The following patch adds
support for this new option to libvirt.

In short, what is this about: to distinguish files uniquely from each other
in general, numeric file IDs are typically used for comparison, which in
practice is the combination of a file's device ID and the file's inode
number. Unfortunately 9p protocol's QID field used for this purpose,
currently is too small to fit both the device ID and inode number in, which
hence is a problem if one 9pfs export contains multiple devices and may
thus lead to misbheaviours on guest (e.g. with SAMBA file servers) in that
case due to potential file ID collisions.

To mitigate this problem with 9pfs a 'multidevs' option was introduced in
QEMU 4.2 for defining how to deal with this, e.g. multidevs=remap will cause
QEMU's 9pfs implementation to remap all inodes from host side to different
inode numbers on guest side in a way that prevents file ID collisions.

NOTE: In the libvirt docs changes of this libvirt patch I simply assumed
"since 6.2.0". So the final libvirt version number would need to be adjusted
in that text if necessary.

See QEMU discussion with following Message-ID for details:


  * Unrelated docs/formatdomain.html.in changes to separate patch.
    [patch 1]

  * Added new capability QEMU_CAPS_VIRTFS_MULTIDEVS.
    [patch 2]

  * XML changes as isolated patch.
    [patch 3]

  * Code style fix.
    [patch 3]

  * QEMU 'multidevs' command handling as isolated patch.
    [patch 4]

  * Error out if not QEMU_CAPS_VIRTFS_MULTIDEVS capability.
    [patch 4]

  * Error out on virtiofs (since it does not have the 'multidevs' option).
    [patch 4]


  * Capabilities test cases would fail if <flag name='virtfs-multidevs'/>
    was added to the other architectures' test case xml files, why?
    [patch 2]

  * The requested test cases to add: Sorry, the libvirt test case
    environment is yet a mystery to me, I would not even know where to
    start here.

Message-ID of v1: address@hidden

Christian Schoenebeck (4):
  docs: virtfs: add section separators
  qemu: capabilities: add QEMU_CAPS_VIRTFS_MULTIDEVS
  conf: add 'multidevs' option
  qemu: add support for 'multidevs' option

 docs/formatdomain.html.in                     | 47 ++++++++++++++++++-
 docs/schemas/domaincommon.rng                 | 10 ++++
 src/conf/domain_conf.c                        | 29 ++++++++++++
 src/conf/domain_conf.h                        | 13 +++++
 src/qemu/qemu_capabilities.c                  |  5 ++
 src/qemu/qemu_capabilities.h                  |  1 +
 src/qemu/qemu_command.c                       |  7 +++
 src/qemu/qemu_domain.c                        | 12 +++++
 .../caps_4.2.0.x86_64.xml                     |  1 +
 .../caps_5.0.0.aarch64.xml                    |  1 +
 .../caps_5.0.0.x86_64.xml                     |  1 +
 11 files changed, 126 insertions(+), 1 deletion(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]