Re: [PATCH 01/21] block: Add atomic write operations to request_queue limits

From: Bart Van Assche
Date: Tue Oct 03 2023 - 12:40:54 EST


On 9/29/23 03:27, John Garry wrote:
+What: /sys/block/<disk>/atomic_write_unit_min_bytes
+Date: May 2023
+Contact: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
+Description:
+ [RO] This parameter specifies the smallest block which can
+ be written atomically with an atomic write operation. All
+ atomic write operations must begin at a
+ atomic_write_unit_min boundary and must be multiples of
+ atomic_write_unit_min. This value must be a power-of-two.

I have two comments about these descriptions:
- Referring to "atomic writes" only is not sufficient. It should be
explained that in this context "atomic" means "indivisible" only and
also that there are no guarantees that the data written by an atomic
write will survive a power failure. See also the difference between
the NVMe parameters AWUN and AWUPF.
- atomic_write_unit_min_bytes will always be the logical block size so I
don't think it is useful to make the block layer track this value nor
to export this value through sysfs.

Thanks,

Bart.