qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Tobias Schramm <tobleminer@gmail.com>, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <e5601e86-7601-b79a-f1eb-9b2a623081c4@redhat.com> (raw)
In-Reply-To: <20170618082813.8091-2-tobleminer@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

On 06/18/2017 03:28 AM, Tobias Schramm wrote:
> Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
> ---
>  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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  parent reply	other threads:[~2017-06-27 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18  8:28 [Qemu-devel] [PATCH 0/1] Add fmask/dmask option for 9p mapped mode Tobias Schramm
2017-06-18  8:28 ` [Qemu-devel] [PATCH 1/1] Add support for custom fmasks/dmasks in 9ps " Tobias Schramm
2017-06-18 13:57   ` Manos Pitsidianakis
2017-06-27 20:01   ` Eric Blake [this message]
2017-06-18 12:37 ` [Qemu-devel] [PATCH 0/1] Add fmask/dmask option for 9p " no-reply
2017-06-18 13:47 ` no-reply

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=e5601e86-7601-b79a-f1eb-9b2a623081c4@redhat.com \
    --to=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tobleminer@gmail.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).