qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] Add support for custom fmasks/dmasks in 9ps


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/1] Add support for custom fmasks/dmasks in 9ps mapped mode
Date: Tue, 27 Jun 2017 15:01:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/18/2017 03:28 AM, Tobias Schramm wrote:
> Signed-off-by: Tobias Schramm <address@hidden>
> ---
>  fsdev/file-op-9p.h      |  4 ++++
>  fsdev/qemu-fsdev-opts.c | 12 ++++++++++++
>  hw/9pfs/9p-local.c      | 33 +++++++++++++++++++++++++++++----
>  hw/9pfs/9p.c            |  3 +++
>  4 files changed, 48 insertions(+), 4 deletions(-)
> 
> diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
> index 0844a403dc..0ecb1d392b 100644
> --- a/fsdev/file-op-9p.h
> +++ b/fsdev/file-op-9p.h
> @@ -76,6 +76,8 @@ typedef struct FsDriverEntry {
>      int export_flags;
>      FileOperations *ops;
>      FsThrottle fst;
> +    mode_t fmask;
> +    mode_t dmask;
>  } FsDriverEntry;
>  

> +++ b/fsdev/qemu-fsdev-opts.c
> @@ -38,6 +38,12 @@ static QemuOptsList qemu_fsdev_opts = {
>          }, {
>              .name = "sock_fd",
>              .type = QEMU_OPT_NUMBER,
> +        }, {
> +            .name = "fmask",
> +            .type = QEMU_OPT_STRING,
> +        }, {
> +            .name = "dmask",
> +            .type = QEMU_OPT_STRING,

No documentation of what these represent (other than the cover letter).
I'd at least expect a comment of 'default creation mask for files' and
'default creation mask for directories'; it would also be nice to state
if the mask is positive or negative logic (compare the third argument
passed to open() which specifies bits to set, vs. the argument to umask
which specifies bits to keep clear).

Also, does this need a QAPI counterpart (or can you even create a 9pfs
device through QMP)?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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