On Wed, Aug 16, 2017 at 05:18:03PM +0200, Christoph Hellwig wrote: > The patch is incorrect - just because we support zeroing using > write zero doesn't mean that any discard will zero the data. > > This subtle difference was one of the main point for the changes. Ok, so the change breaks user space code. Do we have any documentation of what's the right way to do things and what does what ? I can see that you've made blkdev_fallocate() using discard and zeroout with various flags. There is no documentation on what guarantees we have when we use certain combination of flags. Comments for __blkdev_issue_zeroout says If a device is using logical block provisioning, the underlying space will not be released if %flags contains BLKDEV_ZERO_NOUNMAP. So does it mean that this only applies for SCSI UNMAP, not TRIM with reliable RZAT ? I'd like to be able to recognize where we have a device that does support write zero with unmap, TRIM with RZAT and whatever else that provides this. -Lukas