All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: libvir-list@redhat.com
Cc: qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: [PATCH v2 0/4] add support for QEMU 9pfs 'multidevs' option
Date: Fri, 20 Mar 2020 18:01:02 +0100	[thread overview]
Message-ID: <cover.1584723662.git.qemu_oss@crudebyte.com> (raw)

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:
8a2ffe17fda3a86b9a5a437e1245276881f1e235.1567680121.git.qemu_oss@crudebyte.com

v1->v2:

  * 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]

TODO:

  * 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: E1jEFpL-00028n-Qj@lizzy.crudebyte.com

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(-)

-- 
2.20.1



             reply	other threads:[~2020-03-20 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 17:01 Christian Schoenebeck [this message]
2020-03-20 16:46 ` [PATCH v2 1/4] docs: virtfs: add section separators Christian Schoenebeck
2020-03-20 16:48 ` [PATCH v2 2/4] qemu: capabilities: add QEMU_CAPS_VIRTFS_MULTIDEVS Christian Schoenebeck
2020-03-20 16:51 ` [PATCH v2 3/4] conf: add 'multidevs' option Christian Schoenebeck
2020-03-20 16:54 ` [PATCH v2 4/4] qemu: add support for " Christian Schoenebeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1584723662.git.qemu_oss@crudebyte.com \
    --to=qemu_oss@crudebyte.com \
    --cc=groug@kaod.org \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.