On Tue, Jun 11, 2019 at 04:56:24PM +0200, Peter Krempa wrote:
In commit 76b9aba2ba6 I refactored how the function treats the readonly flag which introduced a bug when we'd not allow to force read-write state for an image. This created problems with blockjobs where we need to temporarily override images to read-write. Rename QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_READ_ONLY to QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_OVERRIDE_READ_ONLY and also introduce a complement QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_OVERRIDE_READ_WRITE which
Rather than OVERRIDE_ I'd use FORCE_. overriding read-only access might imply that you want to force it to read-write.
will allow to force wire access.
s/wire/write/
https://bugzilla.redhat.com/show_bug.cgi?id=1717768 Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e521bd3982..595150708b 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -9305,12 +9305,14 @@ typedef enum { QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_REVOKE = 1 << 0, /* operate on full backing chain rather than single image */ QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_CHAIN = 1 << 1, - /* force permissions to read-only when allowing */ - QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_READ_ONLY = 1 << 2, + /* force permissions to read-only/read-write when allowing */ + /* currently does not properly wrok with QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_CHAIN */
s/wrok/work/
+ QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_OVERRIDE_READ_ONLY = 1 << 2, + QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_OVERRIDE_READ_WRITE = 1 << 3, /* don't revoke permissions when modification has failed */ - QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_SKIP_REVOKE = 1 << 3, + QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_SKIP_REVOKE = 1 << 4, /* VM already has access to the source and we are just modifying it */ - QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS = 1 << 4, + QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS = 1 << 5, } qemuDomainStorageSourceAccessFlags; @@ -9344,9 +9346,12 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list