[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfcab01e-dbc8-a990-17b1-4aeadffa5685@samsung.com>
Date: Tue, 17 May 2022 09:55:37 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: <dsterba@...e.cz>
CC: <pankydev8@...il.com>, <dsterba@...e.com>, <hch@....de>,
<linux-nvme@...ts.infradead.org>, <linux-fsdevel@...r.kernel.org>,
<linux-btrfs@...r.kernel.org>, <jiangbo.365@...edance.com>,
<linux-block@...r.kernel.org>, <gost.dev@...sung.com>,
<linux-kernel@...r.kernel.org>, <dm-devel@...hat.com>,
Luis Chamberlain <mcgrof@...nel.org>
Subject: Re: [PATCH v4 05/13] btrfs: zoned: Cache superblock location in
btrfs_zoned_device_info
On 2022-05-16 23:58, David Sterba wrote:
>> Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
>> Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
>> ---
>> 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.
Powered by blists - more mailing lists