qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] block/vvfat: Fix ro shared folder


From: Kevin Wolf
Subject: Re: [PATCH] block/vvfat: Fix ro shared folder
Date: Wed, 8 Sep 2021 16:11:19 +0200

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




reply via email to

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