]> git.ipfire.org Git - thirdparty/qemu.git/commit
file-posix, gluster: Handle zero block status hint better
authorEric Blake <eblake@redhat.com>
Fri, 9 May 2025 20:40:19 +0000 (15:40 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 14 May 2025 20:49:27 +0000 (15:49 -0500)
commita6a0a7fb0e327d17594c971b4a39de14e025b415
tree13452c9f937d9df3ccf1166a966c0ea6561aa66f
parentc33159dec79069514f78faecfe268439226b0f5b
file-posix, gluster: Handle zero block status hint better

Although the previous patch to change 'bool want_zero' into a bitmask
made no semantic change, it is now time to differentiate.  When the
caller specifically wants to know what parts of the file read as zero,
we need to use lseek and actually reporting holes, rather than
short-circuiting and advertising full allocation.

This change will be utilized in later patches to let mirroring
optimize for the case when the destination already reads as zeroes.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250509204341.3553601-17-eblake@redhat.com>
block/file-posix.c
block/gluster.c