[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR04MB7416C7CBF8E4E41D64DF147A9BD39@PH0PR04MB7416.namprd04.prod.outlook.com>
Date: Fri, 20 May 2022 09:15:05 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Pankaj Raghav <p.raghav@...sung.com>,
"dsterba@...e.cz" <dsterba@...e.cz>
CC: "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>,
"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 20/05/2022 11:07, Pankaj Raghav wrote:
> On 5/19/22 09:57, Johannes Thumshirn wrote:
>>> Unfortunately it is not possible to just move the WP in zoned devices.
>>> The only alternative that I could use is to do write zeroes which are
>>> natively supported by some devices such as ZNS. It would be nice to know
>>> if someone had a better solution to this instead of doing write zeroes
>>> in zoned devices.
>>>
>>
>> I have another question. In case we need to pad the sb zone with a write
>> zeros and have a power fail between the write-zeros and the regular
>> super-block write, what happens? I know this padding is only done for the
>> backup super blocks, never the less it can happen and it can happen when
>> the primary super block is also corrupted.
>>
>> AFAIU we're then trying to reach out for a backup super block, look at the
>> write pointer and it only contains zeros but no super block, as only the
>> write-zeros has reached the device and not the super block write.
>>
>> How is this situation handled?
>>
> That is a very good point. I did think about this situation while adding
> padding to the mirror superblock with write zeroes. If the drive is
> **less than 4TB** and with the **primary superblock corrupted**, then it
> will be an issue with the situation you have described for npo2 drives.
> That situation is not handled here. Ofc this is not an issue when we
> have the second mirror at 4TB for bigger drives. Do you have some ideas
> in mind for this failure mode?
The only idea I have for this is creating a bounce buffer, write the padding
and the super-block into the buffer and then submit it. But that's too ugly
to live.
And it would involve changing non-zoned super-block writing code, which I think
is way to risky.
Powered by blists - more mailing lists