Re: [PATCH v4 05/13] btrfs: zoned: Cache superblock location in btrfs_zoned_device_info

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

 



On 2022-05-16 23:58, David Sterba wrote:
>> Reviewed-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
>> Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
>> ---
>>  fs/btrfs/zoned.c | 13 +++++++++----
>>  fs/btrfs/zoned.h |  1 +
>>  2 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
>> index 06f22c021..e8c7cebb2 100644
>> --- a/fs/btrfs/zoned.c
>> +++ b/fs/btrfs/zoned.c
>> @@ -511,6 +511,11 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)
>>  			   max_active_zones - nactive);
>>  	}
>>  
>> +	/* Cache the sb zone number */
>> +	for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; ++i) {
>> +		zone_info->sb_zone_location[i] =
>> +			sb_zone_number(zone_info->zone_size_shift, i);
>> +	}
> 
> I don't think we need to cache the value right now, it's not in any hot
> path and call to bdev_zone_no is relatively cheap (only dereferencing a
> few pointers, all in-memory values).
Ok. I will fix it up in the next revision! Thanks.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux