[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8fc4e862-fa89-2d8d-b340-27a6465b59ca@samsung.com>
Date: Tue, 17 May 2022 10:00:38 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: Johannes Thumshirn <Johannes.Thumshirn@....com>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"damien.lemoal@...nsource.wdc.com" <damien.lemoal@...nsource.wdc.com>,
"pankydev8@...il.com" <pankydev8@...il.com>,
"dsterba@...e.com" <dsterba@...e.com>, "hch@....de" <hch@....de>
CC: "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
"jiangbo.365@...edance.com" <jiangbo.365@...edance.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"gost.dev@...sung.com" <gost.dev@...sung.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dm-devel@...hat.com" <dm-devel@...hat.com>
Subject: Re: [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices
align with sb log offsets
On 2022-05-17 08:50, Johannes Thumshirn wrote:
> On 16/05/2022 18:55, Pankaj Raghav wrote:
>> Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB.
>> These are fixed at these locations so that recovery tools can reliably
>> retrieve the superblocks even if one of the mirror gets corrupted.
>>
>> power of 2 zone sizes align at these offsets irrespective of their
>> value but non power of 2 zone sizes will not align.
>>
>> To make sure the first zone at mirror 1 and mirror 2 align, write zero
>> operation is performed to move the write pointer of the first zone to
>> the expected offset. This operation is performed only after a zone reset
>> of the first zone, i.e., when the second zone that contains the sb is FULL.
>
> Hi Pankaj, stupid question. Npo2 devices still have a zone size being a
> multiple of 4k don't they?
>
> If not, we'd need to also have a tail padding of the superblock zones, in order
> to move the WP of these zones to the end, so the sb-log states match up.
Hi Johannes,
NPO2 zoned devices has a minimum alignment requirement of 1MB. See
commit: `btrfs: zoned: relax the alignment constraint for zoned devices`
It will naturally align to 4k. So I don't think we need special handling
there with tail padding.
Powered by blists - more mailing lists