On Wed, Jan 15, 2025 at 09:42:29PM -0800, Christoph Hellwig wrote: > On Wed, Jan 15, 2025 at 10:14:56AM +1100, Dave Chinner wrote: > > How closely does this match to the block device WRITE_SAME > > (SCSI/NVMe) commands? I note there is a reference to this in the > > RFC, but there are no details given. > > There is no write same in NVMe. In one of the few wiѕe choices in > NVMe the protocol only does a write zeroes for zeroing instead of the > overly complex write zeroes. And no one has complained about that so > far. It should be noted that there is currently a patch proposing to add to fallocate support for the operation FALLOC_FL_WRITE_ZEROS: https://lore.kernel.org/all/20250115114637.2705887-1-yi.zhang@xxxxxxxxxxxxxxx/ For those use cases where this is all the user requires, perhaps this is something that Linux's nfs4 client should consider implementing? In any case I'd suggest that interested file system developers comment on this patch series. Personally, I have no interest in using or implementing in a WRITE_SAME operation which implements the all-singing, all-dancing WRITE_SAME as envisioned by the SCSI and NFSv4.2 specifications. I will also note that many Cloud vendors (AWS, GCE, Azure) are moving to using NVMe instead of SCSI, especially for the higher performance VM and software-defined block devices. So, I would suspect that a customer would have to wave a **very** large amount of money under my employer's nose before this would be something that would be funded by $WORK for block-based file systems (and even then, it appears that NVMe is so much better at higher performance storage, such that I'm not sure how many customers would really be all that interested). But hey, if someone knows of some AI-related workload that needs to write the same non-zero block a very large number of times, let me know. :-) Cheers, - Ted