Re: [PATCH RFC 3/4] block: Support atomic writes limits for stacked devices

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

 



On 12/09/2024 14:16, Christoph Hellwig wrote:
On Tue, Sep 03, 2024 at 03:07:47PM +0000, John Garry wrote:
+	} else if (t->features & BLK_FEAT_ATOMIC_WRITES) {
+		t->atomic_write_hw_max = min_not_zero(t->atomic_write_hw_max,
+						b->atomic_write_hw_max);
+		t->atomic_write_boundary_sectors =
+					min_not_zero(t->atomic_write_boundary_sectors,
+						b->atomic_write_boundary_sectors);
+		t->atomic_write_hw_unit_min = max(t->atomic_write_hw_unit_min,
+						b->atomic_write_hw_unit_min);
+		t->atomic_write_hw_unit_max =
+					min_not_zero(t->atomic_write_hw_unit_max,
+						b->atomic_write_hw_unit_max);

Maybe split this into a helper to make the code more readable?

Yeah, I will do.

I was reworking this anyway.

So far I am not supporting a stripe unit with which is not a power-of-2. But that is too restrictive. And lifting that restriction makes calculating atomic write limits more complicated.


Otherwise this looks good to me.

cheers




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux