Re: [PATCH v4] block: get wp_offset by bdev_offset_from_zone_start

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

 



On 12/10/24 1:23 PM, Bart Van Assche wrote:
> On 11/6/24 6:04 PM, LongPing Wei wrote:
>> Call bdev_offset_from_zone_start() instead of open-coding it.
>>
>> Fixes: dd291d77cc90 ("block: Introduce zone write plugging")
>> Signed-off-by: LongPing Wei <weilongping@xxxxxxxx>
>> Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
>> ---
>> v4: update commit message
>> ---
>>   block/blk-zoned.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/blk-zoned.c b/block/blk-zoned.c
>> index af19296fa50d..77a448952bbd 100644
>> --- a/block/blk-zoned.c
>> +++ b/block/blk-zoned.c
>> @@ -537,7 +537,7 @@ static struct blk_zone_wplug *disk_get_and_lock_zone_wplug(struct gendisk *disk,
>>       spin_lock_init(&zwplug->lock);
>>       zwplug->flags = 0;
>>       zwplug->zone_no = zno;
>> -    zwplug->wp_offset = sector & (disk->queue->limits.chunk_sectors - 1);
>> +    zwplug->wp_offset = bdev_offset_from_zone_start(disk->part0, sector);
>>       bio_list_init(&zwplug->bio_list);
>>       INIT_WORK(&zwplug->bio_work, blk_zone_wplug_bio_work);
>>       zwplug->disk = disk;
> 
> Hi LongPing Wei,
> 
> Since this patch has not yet been merged, how about reposting it?

No need, bubbled to the top and I got it applied.

-- 
Jens Axboe





[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