Skip to content

block/file-posix: Fix fully preallocated truncate

Max Reitz qemu-devel 1 version Applied

Status from this message: Applied to my block tree... (*cough* *cough* -- I'm the worst when it

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2block/file-posix: Fix fully preallocated truncateblock/file-posix.c+3 -27 replies
2/2iotests: Test preallocated truncate of 2G imagetests/qemu-iotests/106 tests/qemu-iotests/106.out+34 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel P. BerrangéEric Blake
SeriesR-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate

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

 block/file-posix.c         |  5 +++--
 tests/qemu-iotests/106     | 24 ++++++++++++++++++++++++
 tests/qemu-iotests/106.out | 10 ++++++++++
 3 files changed, 37 insertions(+), 2 deletions(-)
Signature · 1 line
2.14.3