Re: [PATCH v5 16/28] null_blk: Introduce zone_append_max_sectors attribute

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

 



On 4/3/24 01:42, Damien Le Moal wrote:
+	zone_append_max_bytes =
+		ALIGN_DOWN(dev->zone_append_max_sectors << SECTOR_SHIFT,
+			   dev->blocksize);
+	dev->zone_append_max_sectors =
+		min(zone_append_max_bytes >> SECTOR_SHIFT, zone_capacity_sects);

I think the above code can be simplified to the following:

dev->zone_append_max_sectors =
        min(ALIGN_DOWN(dev->zone_append_max_sectors,
                       dev->blocksize >> SECTOR_SHIFT),
            zone_capacity_sects);

Anyway:

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux