On Thu, 24 Jan 2019 18:20:23 +0100, Ilya Dryomov wrote: > On Thu, Jan 24, 2019 at 5:45 PM David Disseldorp <ddiss@xxxxxxx> wrote: > > > > On Mon, 21 Jan 2019 08:58:22 -0500, Jason Dillaman wrote: > > > > > > Indeed, the users of REQ_NONUMAP are ioctl() and fallocate(), so the > > > > only > > > > practical value which comes to mind is performance (preallocate zeroed > > > > blocks and format any fs, etc) and possible secure-erase. After some > > > > internal discussions about performance of writing zeroes (instead of > > > > true DISCARD) this seems does not bring any value, at least on > > > > bluestore, > > > > but secure wipe can make sense (for example using blkdiscard --zerouut). > > > > Another possible use case could be space reservations for thin (over) > > provisioned storage. E.g. I don't have anything to write now, but want > > to make sure that the array won't reject writes to this region in > > future. > > I think you might be conflating REQ_NONUMAP with UNMAP flag to WRITE > SAME (and the way zeroout is implemented for SCSI). As I understand it, > REQ_NOUNMAP means "try to avoid deallocating when zeroing", definitely > not "allocate if not yet allocated". That doesn't quite match my interpretation of blkdiscard(8) "Zero-fill rather than discard" and blk_types.h "write the zero filled sector many times" + "do not free blocks when zeroing". Either way, I'll work on adding blktests coverage for this so that semantics can be agreed upon somewhere. Cheers, David