qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Schoenebeck via Qemu-devel <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: Greg Kurz <groug@kaod.org>,
	Antonios Motakis <antonios.motakis@huawei.com>
Subject: Re: [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii'
Date: Tue, 07 May 2019 15:48:47 +0200	[thread overview]
Message-ID: <1985409.cXXgv05A0a@silver> (raw)
In-Reply-To: <20190507125756.GP27205@redhat.com>

On Dienstag, 7. Mai 2019 13:57:56 CEST Daniel P. Berrangé wrote:
> >       ...
> >       <filesystem type='mount' accessmode='mapped'>
> >       
> >         <source dir='/vm/fs'/>
> >         <target dir='root'/>
> >         <important path='/var/shares'/>
> >         <important path='/tmp'/>
> >       
> >       </filesystem>
> >     
> >     </devices>
> >   
> >   </domain>
> > 
> > Like with the vii qemu virtfs command line argument, the order of the
> > "important" tag defines which one gets the highest inode namespace
> > (smallest generated suffix) on guest side.
> 
> Do we think anyone is likely to use this feature in the real world ?

I don't know if other people need it, that's one of the reasons why I am 
asking for a coarse high level feedback of the current v3 patch set before 
getting into the details.

The only thing I can say right now is that I must use this feature when 
running Samba to avoid all kinds of serious problems. And I could imagine 
inode namespace control to become more of an issue once nested virtualization 
becomes more popular.

> I'm not really a fan of the representation, because this is affecting
> guest ABI via a side effect of the ordering which is the kind of thing
> that has got us in trouble before.  If we need control over the IDs
> used for each mount point, then I tend to think we need to represent
> it explicitly such that the mgmt app sets the exact ID used.
> 
>      <pathid dir="/var/shares" id="0x1"/>
>      <pathid dir="/tmp" id="0x3"/>
> 
> this ensures that the IDs are still stable when adding or removing
> paths

Well, that would lead to the exact opposite of what you asked for. Because 
allowing admins to configure an exact ID (which I think you mean should be used 
as exact inode suffix by 9p then) would expose implementation details inside 
9pfs to config space, which are subject to change, might collide with 
implementation details, and requires implementation knowledge and extreme care 
by admins so they would pick appropriate IDs with "suffix-free" property which 
are guaranteed to create unique numbers in all cases:

https://en.wikipedia.org/wiki/Prefix_code

Also keep in mind that one fs device might end up having multiple suffixes.

Hence my suggestion was to only expose the bare minimum to config space 
regarding this issue: Asking (if required at all) admins which ones are the 
most critical pathes regarding inode namespace for their use cases, and 9p 
would then automatically generate appropriate suffixes for those mentioned by 
admin to achieve the highest inode namespace appropriately and in a safe way.

Plus for the "important path=" semantics I suggested you don't have have to 
use mount points BTW. You can use subdirs and even individual files and 9pfs 
would then automatically resolve the appropriate fs device of the given path. 
So e.g. when using nested virtualization, an admin inside a lower level guest 
does not even need to know the exact mount points on a higher level / host.

Best regards,
Christian Schoenebeck


      reply	other threads:[~2019-05-07 13:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 14:37 [Qemu-devel] [PATCH v3 0/5] 9p: Fix file ID collisions Christian Schoenebeck via Qemu-devel
2019-04-23 11:30 ` [Qemu-devel] [PATCH v3 1/5] 9p: mitigates most QID path collisions Christian Schoenebeck via Qemu-devel
2019-05-07 12:42   ` Daniel P. Berrangé
2019-05-07 13:11     ` Christian Schoenebeck via Qemu-devel
2019-05-07 13:13       ` Daniel P. Berrangé
2019-04-23 11:35 ` [Qemu-devel] [PATCH v3 2/5] 9P: trivial cleanup of QID path collision mitigation Christian Schoenebeck via Qemu-devel
2019-05-07 12:43   ` Daniel P. Berrangé
2019-04-23 11:41 ` [Qemu-devel] [PATCH v3 3/5] 9p: persistency of QID path beyond reboots / suspensions Christian Schoenebeck via Qemu-devel
2019-05-03 14:51 ` [Qemu-devel] [PATCH v3 4/5] 9p: use variable length suffixes for inode mapping Christian Schoenebeck via Qemu-devel
2019-05-05 21:41 ` [Qemu-devel] [PATCH v3 5/5] 9p: adds virtfs 'vii' device parameter Christian Schoenebeck via Qemu-devel
2019-05-06 17:58   ` [Qemu-devel] [libvirt patch] qemu: adds support for virtfs 9p argument 'vii' Christian Schoenebeck via Qemu-devel
2019-05-07  9:55     ` Greg Kurz
2019-05-07 12:23       ` Christian Schoenebeck via Qemu-devel
2019-05-07 15:42         ` Greg Kurz
2019-05-07 16:16           ` Christian Schoenebeck via Qemu-devel
2019-05-17  8:40             ` Christian Schoenebeck via Qemu-devel
2019-05-17 12:30               ` Greg Kurz
2019-05-17 13:23                 ` Christian Schoenebeck via Qemu-devel
2019-05-17 14:47                   ` Greg Kurz
2019-05-17 20:53                     ` Christian Schoenebeck via Qemu-devel
2019-05-20 14:05                       ` Greg Kurz
2019-05-22 16:03                         ` Christian Schoenebeck via Qemu-devel
2019-06-03  6:57                           ` Greg Kurz
2019-06-03  9:17                             ` Christian Schoenebeck via Qemu-devel
2019-05-07 12:57     ` Daniel P. Berrangé
2019-05-07 13:48       ` Christian Schoenebeck via Qemu-devel [this message]

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=1985409.cXXgv05A0a@silver \
    --to=qemu-devel@nongnu.org \
    --cc=antonios.motakis@huawei.com \
    --cc=groug@kaod.org \
    --cc=qemu_oss@crudebyte.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).