qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully p


From: Eric Blake
Subject: Re: [Qemu-stable] [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate
Date: Wed, 28 Feb 2018 08:22:37 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/28/2018 07:13 AM, Max Reitz wrote:
Fully preallocated truncation has a 50 % chance of working on images
files over file-posix.  It works if $SIZE % 4G < 2G, and it fails
otherwise.  To make things even more interesting, often you would not
even notice because qemu reported success even though it did nothing
(because after the successful lseek(), errno was still 0, so when the
file-posix driver tried to return a negative error code, it actually
reported success).

This issue is fixed by patch 1 in this series.  Thanks to Daniel for
reporting!


Max Reitz (2):
   block/file-posix: Fix fully preallocated truncate
   iotests: Test preallocated truncate of 2G image

Good catch.  Series:
Reviewed-by: Eric Blake <address@hidden>

gluster.c has similar code, but it assigns glfs_lseek() to an int64_t, so it does not have the bug.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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