[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target v
From: |
Alex Bligh |
Subject: |
Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation) |
Date: |
Thu, 22 Aug 2013 20:27:12 +0100 |
On 22 Aug 2013, at 12:45, Stefan Hajnoczi wrote:
> Looks good but please include a new qemu-iotest test case that checks:
>
> 1. Error if the target volume does not exist.
Can do
> 2. Success if a correctly sized target volume exists.
>
> 3. ?? if an incorrectly sized target volume exists.
Good catch re size.
The behaviour of the current code appears to be as follows
(Alexandre's code not mine):
a) if the target volume size > the converted volume size, convert
leaving the remaining data on the target volume as is. This
is I believe useful, as on (e.g.) rbd, the target volume size
may be larger than required due to rounding requirements.
b) if the target volume size < the converted volume size, convert
truncates it but does not error. I'm torn between whether this
continue to do exactly as it asked, attempt to expand the
volume, or error. These all seem reasonably easy (the expand
option presumably being a call to bdrv_truncate).
Before we get to testing, I'm guessing we should establish
whether (a) is correct (I think yes), and what the correct
behaviour is for (b).
--
Alex Bligh