[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 10/10] block: Allow changing 'force-share' on
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v3 10/10] block: Allow changing 'force-share' on reopen |
Date: |
Wed, 26 Sep 2018 13:34:28 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 06.09.2018 um 11:37 hat Alberto Garcia geschrieben:
> 'force-share' is one of the basic BlockdevOptions available for all
> drivers, but it's not handled by bdrv_reopen_prepare() so any attempt
> to change it results in a "Cannot change the option" error:
>
> (qemu) qemu-io virtio0 "reopen -o force-share=on"
> Cannot change the option 'force-share'
>
> Since there's no reason why we shouldn't allow changing it and the
> implementation is simple let's just do it.
>
> It's worth noting that after this patch the above reopen call will
> still return an error -although a different one- if the image is not
> read-only:
>
> (qemu) qemu-io virtio0 "reopen -o force-share=on"
> force-share=on can only be used with read-only images
>
> Signed-off-by: Alberto Garcia <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> @@ -3353,6 +3370,7 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state)
> bs->open_flags = reopen_state->flags;
> bs->read_only = !(reopen_state->flags & BDRV_O_RDWR);
> bs->detect_zeroes = reopen_state->detect_zeroes;
> + bs->force_share = reopen_state->force_share;
Just changing bs->force_share without actually triggering recalculation
of the permissions is kind of pointless, no? As the patch is, you would
have to trigger some graph change for the new setting to take effect.
The rest of the series looks good to me, so if you like, I could apply
patches 1-9, and then you can either send a v4 of only this one or we'll
just drop it.
Kevin
- [Qemu-block] [PATCH v3 05/10] block: Allow child references on reopen, (continued)
- [Qemu-block] [PATCH v3 05/10] block: Allow child references on reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 09/10] block: Allow changing 'detect-zeroes' on reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 02/10] file-posix: x-check-cache-dropped should default to false on reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 03/10] block: Remove child references from bs->{options, explicit_options}, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 06/10] block: Forbid trying to change unsupported options during reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 04/10] block: Don't look for child references in append_open_options(), Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 01/10] qemu-io: Fix writethrough check in reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 07/10] file-posix: Forbid trying to change unsupported options during reopen, Alberto Garcia, 2018/09/06
- [Qemu-block] [PATCH v3 10/10] block: Allow changing 'force-share' on reopen, Alberto Garcia, 2018/09/06
- Re: [Qemu-block] [PATCH v3 10/10] block: Allow changing 'force-share' on reopen,
Kevin Wolf <=