It's relied that atomic_write_unit_max is <= atomic_write_boundary and both are a power-of-2. Please see the NVMe patch, which this is checked. Indeed, it would not make sense if atomic_write_unit_max > atomic_write_boundary (when non-zero).Ok fine but in case the device doesn't support namespace atomic boundary size (i.e. NABSPF is zero) then still do we need
So if the write is naturally aligned and its size is <= atomic_write_unit_max, then it cannot be straddling a boundary.
to restrict IO which crosses the atomic boundary?
I am quoting this from NVMe spec (Command Set Specification, revision 1.0a, Section 2.1.4.3) :
"To ensure backwards compatibility, the values reported for AWUN, AWUPF, and ACWU shall be set such that
they are supported even if a write crosses an atomic boundary. If a controller does not
guarantee atomicity across atomic boundaries, the controller shall set AWUN, AWUPF, and ACWU to 0h (1 LBA)."