qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] block/fuse: Let PUNCH_HOLE write zeroes
@ 2023-02-27 10:47 Hanna Czenczek
  2023-02-27 10:47 ` [PATCH 1/2] " Hanna Czenczek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hanna Czenczek @ 2023-02-27 10:47 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Hanna Czenczek, Kevin Wolf

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(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-07 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27 10:47 [PATCH 0/2] block/fuse: Let PUNCH_HOLE write zeroes Hanna Czenczek
2023-02-27 10:47 ` [PATCH 1/2] " Hanna Czenczek
2023-02-27 10:47 ` [PATCH 2/2] iotests/308: Add test for 'write -zu' Hanna Czenczek
2023-03-07 14:23 ` [PATCH 0/2] block/fuse: Let PUNCH_HOLE write zeroes Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).