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]     [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