[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 43/47] mirror: allow customizing the granularity
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 43/47] mirror: allow customizing the granularity |
Date: |
Sat, 28 Jul 2012 07:43:38 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 07/24/2012 05:04 AM, Paolo Bonzini wrote:
> The desired granularity may be very different depending on the kind of
> operation (e.g. continous replication vs. collapse-to-raw) and whether
s/continous/continuous/
> the VM is expected to perform lots of I/O while mirroring is in progress.
> Allow the user to customize it.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> @@ -857,6 +858,17 @@ void qmp_drive_mirror(const char *device, const char
> *target,
> if (!has_mode) {
> mode = NEW_IMAGE_MODE_ABSOLUTE_PATHS;
> }
> + if (!has_granularity) {
> + granularity = 65536;
> + }
> + if (granularity < 512 || granularity > 1048576 * 64) {
> + error_set(errp, QERR_INVALID_PARAMETER, device);
> + return;
> + }
> + if (granularity & (granularity - 1)) {
> + error_set(errp, QERR_INVALID_PARAMETER, device);
> + return;
In the XBZLRE migration series, we decided to round the users input down
to a power of two instead of reject it. Should we do that here? Also,
there is already an explicit QERR_PROPERY_VALUE_NOT_POWER_OF_2 that
might fit better here (depending on how the error cleanup series goes).
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 30/47] mirror: implement completion, (continued)
- [Qemu-devel] [PATCH 30/47] mirror: implement completion, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 21/47] block: add bdrv_ensure_backing_file, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 35/47] qemu-iotests: add testcases for mirroring on-source-error/on-target-error, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 24/47] block: introduce new dirty bitmap functionality, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 45/47] mirror: add buf-size argument to drive-mirror, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 25/47] block: add block-job-complete, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 43/47] mirror: allow customizing the granularity, Paolo Bonzini, 2012/07/24
- Re: [Qemu-devel] [PATCH 43/47] mirror: allow customizing the granularity,
Eric Blake <=
[Qemu-devel] [PATCH 44/47] mirror: switch mirror_iteration to AIO, Paolo Bonzini, 2012/07/24
[Qemu-devel] [PATCH 38/47] block: implement dirty bitmap using HBitmap, Paolo Bonzini, 2012/07/24
Re: [Qemu-devel] [PATCH 00/47] Block job improvements for 1.2, Eric Blake, 2012/07/28