[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 1/6] qemu-io: Reset qemuio_blk perm
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 1/6] qemu-io: Reset qemuio_blk permissions before each command |
Date: |
Fri, 15 Sep 2017 12:44:30 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/15/2017 05:10 AM, Kevin Wolf wrote:
> qemu-io provides a 'reopen' command that allows switching from writable
> to read-only access. We need to make sure that we don't try to keep
> write permissions to a BlockBackend that becomes read-only, otherwise
> things are going to fail.
>
> command() already makes sure to request any additional permissions that
> a qemu-io command requires, so just resetting the permissions to values
> that are safe for read-only images is enough to fix this.
>
> As a side effect, this makes the output of qemu-iotests case 187 more
> consistent.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> qemu-io.c | 13 +++++++++++++
> tests/qemu-iotests/187.out | 2 +-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature