On 07/26/2018 10:23 AM, Eric Blake wrote:
Hmm - that thread also mentions FALLOC_FL_NO_HIDE_STALE, which is a new
flag not present/documented on Fedora 28. I wonder if it helps, too.
Even more odd - that flag has been proposed to the kernel since 2012 but
still not mentioned in the F28 man page:
https://lwn.net/Articles/492920/
and that its use on block devices is much more recent, just last month:
https://webcache.googleusercontent.com/search?q=cache:1LV2Y06XnjkJ:https://patchwork.kernel.org/patch/10466183/+&cd=5&hl=en&ct=clnk&gl=us&client=firefox-b-1
but now that I've read that, it makes total sense that the combination
PUNCH_HOLE|NO_HIDE_STALE is explicitly asking for semantics of "discard
as fast as possible regardless of whatever later reads will see", while
plain PUNCH_HOLE means "guarantee that I can read zeroes, using the
fastest means possible [discard, if that works]"
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org