qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2] qemu-img: Check post-truncation size


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v2] qemu-img: Check post-truncation size
Date: Mon, 30 Apr 2018 13:52:11 +0100
User-agent: Mutt/1.9.2 (2017-12-15)

On Sat, Apr 21, 2018 at 06:39:57PM +0200, Max Reitz wrote:
> Some block drivers (iscsi and file-posix when dealing with device files)
> do not actually support truncation, even though they provide a
> .bdrv_truncate() method and will happily return success when providing a
> new size that does not exceed the current size.  This is because these
> drivers expect the user to resize the image outside of qemu and then
> provide qemu with that information through the block_resize command
> (compare cb1b83e740384b4e0d950f3d7c81c02b8ce86c2e).
> 
> Of course, anyone using qemu-img resize will find that behavior useless.
> So we should check the actual size of the image after the supposedly
> successful truncation took place, emit an error if nothing changed and
> emit a warning if the target size was not met.
> 
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1523065
> Signed-off-by: Max Reitz <address@hidden>
> ---
> v2: Drop dots in {error,warn}_report() messages [Eric]
> 
> v1: http://lists.nongnu.org/archive/html/qemu-block/2018-04/msg00441.html
> ---
>  qemu-img.c | 39 +++++++++++++++++++++++++++++++++++----
>  1 file changed, 35 insertions(+), 4 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]