qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Guillaume Roche <groche@genymobile.com>
Cc: Hanna Reitz <hreitz@redhat.com>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>,
	"open list:Block layer core" <qemu-block@nongnu.org>
Subject: Re: [PATCH] block/vvfat: Fix ro shared folder
Date: Wed, 8 Sep 2021 16:11:19 +0200	[thread overview]
Message-ID: <YTjEh+ubHuoQur3e@redhat.com> (raw)
In-Reply-To: <20210831141727.347597-1-groche@genymobile.com>

Am 31.08.2021 um 16:17 hat Guillaume Roche geschrieben:
> QEMU exits in error when passing a vfat shared folder in read-only mode.
> 
> To fix this issue, this patch removes any potential write permission
> from cumulative_perms, when a read-only block device is in use.
> 
> Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918950
> 
> Signed-off-by: Guillaume Roche <groche@genymobile.com>
> ---
> This is an attempt to fix this behavior, but it feels a bit hacky to me
> since this patch checks for the vvfat format in a generic function.
> 
> However, I'd be glad to have some advice to make it better. Anyway, I
> ran the block tests to ensure this does not introduce any regression.
> 
> To add some context: I know that this can be worked around by setting 
> the shared folder in rw mode. But our use-case requires using both
> shared and VM snapshots, and QEMU prevents using snapshot with a rw 
> shared folder.

I don't think the behaviour is actually a bug: ide-hd requires a
writable backend, so attaching a read-only vvfat node is a real error.

You can either specify -drive read-only=on and use a device that can
accept read-only backends (such as virtio-blk or ide-cd), or add a
temporary writable qcow2 overlay with -snapshot or -drive snapshot=on so
that the ide-hd device actually does get the writable backend it needs.

Kevin



      parent reply	other threads:[~2021-09-08 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 14:17 [PATCH] block/vvfat: Fix ro shared folder Guillaume Roche
2021-08-31 16:06 ` Philippe Mathieu-Daudé
2021-09-02 15:41   ` Guillaume Roche
2021-09-08 14:11 ` Kevin Wolf [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=YTjEh+ubHuoQur3e@redhat.com \
    --to=kwolf@redhat.com \
    --cc=groche@genymobile.com \
    --cc=hreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 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).