Skip to content

block/fuse: Let PUNCH_HOLE write zeroes

Hanna Czenczek qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2block/fuse: Let PUNCH_HOLE write zeroesblock/export/fuse.c+10 -10 replies
2/2iotests/308: Add test for 'write -zu'tests/qemu-iotests/308 tests/qemu-iotests/308.out+78 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] block/fuse: Let PUNCH_HOLE write zeroes

Hi,

https://gitlab.com/qemu-project/qemu/-/issues/1507 reports a bug in FUSE
exports: fallocate(PUNCH_HOLE) is implemented with blk_pdiscard(), but its man page documents that a successful call will result in the data being read as zero. blk_pdiscard() does not guarantee this, so we must use blk_pwrite_zeroes() instead (with MAY_UNMAP | NO_FALLBACK, which differentiates it from fallocate(ZERO_RANGE)).

Patch 2 adds a regression test.

Hanna Czenczek (2):
block/fuse: Let PUNCH_HOLE write zeroes
iotests/308: Add test for 'write -zu'

 block/export/fuse.c        | 11 +++++++++-
 tests/qemu-iotests/308     | 43 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/308.out | 35 +++++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.1