[libvirt PATCH v4 3/4] qemu: add support for 'fmode' and 'dmode'

2020-10-08 Thread Brian Turek
Add logic to validate and then pass through 'fmode' and 'dmode' to the QEMU call. Signed-off-by: Brian Turek --- src/qemu/qemu_command.c | 6 +++ src/qemu/qemu_validate.c | 18 .../virtio-9p-createmode.x86_6

[libvirt PATCH v4 2/4] qemu: add 'fmode' and 'dmode' options

2020-10-08 Thread Brian Turek
Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the 'filesystem' node in the domain XML. These options control the creation mode of files and directories, respectively, when using accessmode=mapped. Signed-off-by: Brian Turek

[libvirt PATCH v4 4/4] qemu: add docs for 'fmode' and 'dmode' options

2020-10-08 Thread Brian Turek
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index cc4f91d4ea..48a5b821bd 100644 --- a/d

[libvirt PATCH v4 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-10-08 Thread Brian Turek
The QEMU 9pfs 'fmode' and 'dmode' options have existed since QEMU 2.10. Probe QEMU's command line set to check whether these options are available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian Turek --- Note th

[libvirt PATCH v4 0/4] Add support for QEMU's fmode and dmode

2020-10-08 Thread Brian Turek
ning being that it is essentially enforcing the schema rather than performing QEMU-specific validation. Brian Turek (4): qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE qemu: add 'fmode' and 'dmode' options qemu: add support for 'fmode' and 'dmode'

Re: [libvirt PATCHv3 0/4] Add support for QEMU's fmode and dmode

2020-10-06 Thread Brian Turek
Peter Krempa wrote: > Since the qemu command line option is formatted as 4 octal digits, a > mode such as '1775' which is a valid mode for a directory will still be > formatted as something which looks like a decimal number: > > -fsdev local,security_model=mapped,dmode=1775,id=fsdev-fs1,path=/expor

[libvirt PATCHv3 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-10-05 Thread Brian Turek
The QEMU 9pfs 'fmode' and 'dmode' options have existed since QEMU 2.10. Probe QEMU's command line set to check whether these options are available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian Turek --- src

[libvirt PATCHv3 2/4] qemu: add support for 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
0600 and directories with mode 0700. Signed-off-by: Brian Turek --- src/conf/domain_conf.c| 27 src/conf/domain_conf.h| 2 + src/qemu/qemu_command.c | 6 ++ src/qemu/qemu_validate.c | 18

[libvirt PATCHv3 3/4] qemu: add schema 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
Adds schema to validate the 'fmode' and 'dmode' attributes on a 'fileystem' node. Checks to ensure that the values are 1-4 octal digits long. Signed-off-by: Brian Turek --- docs/schemas/domaincommon.rng | 16 1 file changed, 16 insertions

[libvirt PATCHv3 0/4] Add support for QEMU's fmode and dmode

2020-10-05 Thread Brian Turek
on ensures there is always a preceeding 0 in the QEMU args (using %04o formatting) and explictly sets it in the generated XML. Brian Turek (4): qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE qemu: add support for 'fmode' and 'dmode' options qemu: add schema 'fmode&#x

[libvirt PATCHv3 4/4] qemu: add docs for 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 12 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index cc4f91d4ea..085f29ef8f 100644 --- a/d

[PATCHv3 3/5] qemu: add schema 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
Adds schema to validate the 'fmode' and 'dmode' attributes on a 'fileystem' node. Checks to ensure that the values are 1-4 octal digits long. Signed-off-by: Brian Turek --- docs/schemas/domaincommon.rng | 16 1 file changed, 16 insertions

[PATCHv3 2/5] qemu: add support for 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
0600 and directories with mode 0700. Signed-off-by: Brian Turek --- src/conf/domain_conf.c| 27 src/conf/domain_conf.h| 2 + src/qemu/qemu_command.c | 6 ++ src/qemu/qemu_validate.c | 18

[PATCHv3 1/5] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-10-05 Thread Brian Turek
The QEMU 9pfs 'fmode' and 'dmode' options have existed since QEMU 2.10. Probe QEMU's command line set to check whether these options are available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian Turek --- src

[PATCHv3 4/5] qemu: add docs for 'fmode' and 'dmode' options

2020-10-05 Thread Brian Turek
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 12 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index cc4f91d4ea..085f29ef8f 100644 --- a/d

Re: [PATCH v2 0/4] Add support for QEMU's 'fmode' and 'dmode'

2020-10-05 Thread Brian Turek
I did some further testing and it appears that QEMU is reading the flags as base-10 which causes issues. I'll need to make some tweaks and release a v3 of the patches later today. Please ignore this set. On Fri, Oct 2, 2020, 11:55 AM Brian Turek wrote: > This second version of t

[PATCH 3/4] qemu: add schema 'fmode' and 'dmode' options

2020-10-02 Thread Brian Turek
Adds schema to validate the 'fmode' and 'dmode' attributes on a 'fileystem' node. Checks to ensure that the values are 1-3 octal digits long. Signed-off-by: Brian Turek --- docs/schemas/domaincommon.rng | 16 1 file changed, 16 insertions

[PATCH 2/4] qemu: add support for 'fmode' and 'dmode' options

2020-10-02 Thread Brian Turek
e 600 and directories with mode 700. Signed-off-by: Brian Turek --- src/conf/domain_conf.c| 27 src/conf/domain_conf.h| 2 + src/qemu/qemu_command.c | 6 ++ src/qemu/qemu_validate.c | 18

[PATCH v2 0/4] Add support for QEMU's 'fmode' and 'dmode'

2020-10-02 Thread Brian Turek
This second version of the patch incorporates Peter Krempa's feedback by tweaking a few things in the code and, more importantly, splitting up the singular large patch into smaller patches. Brian Turek (4): qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE qemu: add support for '

[PATCH 4/4] qemu: add docs for 'fmode' and 'dmode' options

2020-10-02 Thread Brian Turek
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 12 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f3cf9e1fb3..88d836da08 100644 --- a/d

[PATCH 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-10-02 Thread Brian Turek
The QEMU 9pfs 'fmode' and 'dmode' options exists since QEMU 2.10. Probe QEMU's command line set to check whether these options are really available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian Turek --- src

[PATCH 1/1] qemu: add support for 'fmode' and 'dmode'

2020-10-01 Thread Brian Turek
or files and 700 for directories. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 12 docs/schemas/domaincommon.rng | 16 + src/conf/domain_conf.c| 43 + src/conf/domain_conf.h

[PATCH 0/1] Add support for QEMU's 'fmode' and 'dmode'

2020-10-01 Thread Brian Turek
hether modifying all of the 'caps' files was necessary or if only a certain few needed changing. Brian Turek (1): qemu: add support for 'fmode' and 'dmode' docs/formatdomain.rst | 12 docs/schemas/domaincommon.rng

RFE - Add support for QEMU's 9pfs's fmode/dmode options

2020-09-30 Thread Brian Turek
Hello All, I recently ran into problems with the default very restrictive permissions for files that are created via 9pfs host/guest shares (600 for files, 700 for directories). QEMU added two new-ish flags, fmode and dmode, to its 9pfs implementation so that users are able to control these exact