[Top][All Lists]

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

Re: [Qemu-block] [PATCH 24/27] file-posix: Fix no-op bdrv_truncate() wit

From: Max Reitz
Subject: Re: [Qemu-block] [PATCH 24/27] file-posix: Fix no-op bdrv_truncate() with falloc preallocation
Date: Mon, 12 Feb 2018 18:41:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 2018-02-08 20:23, Kevin Wolf wrote:
> If bdrv_truncate() is called, but the requested size is the same as
> before, don't call posix_fallocate(), which returns -EINVAL for length
> zero and would therefore make bdrv_truncate() fail.
> The problem can be triggered by creating a zero-sized raw image with
> 'falloc' preallocation mode.
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  block/file-posix.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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