On Thu, Aug 22, 2013 at 08:27:12PM +0100, Alex Bligh wrote: > > On 22 Aug 2013, at 12:45, Stefan Hajnoczi wrote: > 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.
Seems ok. > 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). Silently truncating can be a problem, e.g. the user deletes the original file after conversion completes and later discovers not all data was copied. I think we should fail here. Stefan