Re: [PATCH RFC 4/4] block: use chunk_sectors when evaluating stacked atomic write limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/06/2025 16:23, Nilay Shroff wrote:
  	t->atomic_write_hw_unit_min = min(b->atomic_write_hw_unit_min,
  					  t->atomic_write_hw_unit_max);
-	t->atomic_write_hw_max = min(b->atomic_write_hw_max, t->io_min);
+	t->atomic_write_hw_max = min(b->atomic_write_hw_max, chunk_size);
return true;
  }
This works well with my NVMe disk which supports atomic writes however the only
concern is what if in case t->chunk_sectors is also defined for NVMe disk?
I see that nvme_set_chunk_sectors() initializes the chunk_sectors for NVMe.
The value which is assigned to lim->chunk_sectors in nvme_set_chunk_sectors()
represents "noiob" (i.e. Namespace Optimal I/O Boundary). My disk has "noiob"
set to zero but in case if it's non-zero then would it break the above logic
for NVMe atomic writes?

Yeah, I think that I need to change the code to account for the bottom device setting chunk_sectors.

Thanks,
John




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux