Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3305606lfo; Mon, 23 May 2022 01:13:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKrfGIhrQtS/4MwbS5zqtiAiy63bsn0kASgXviCA76F5ClqPURD5gK0PSsgQT26OFSK30q X-Received: by 2002:a17:90b:1a8a:b0:1e0:3630:19f0 with SMTP id ng10-20020a17090b1a8a00b001e0363019f0mr7591429pjb.89.1653293604392; Mon, 23 May 2022 01:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293604; cv=none; d=google.com; s=arc-20160816; b=TyJIsPphbVAT2eZFIJXTmNBbs0MfnHEfAXNNe0WledToO6dB+W4/2yJyTsnCyD6Q5H QyqL1dodzumsETzOkGqvctgnZrcMOC/MADBWQ/eE+xaWwK+rR+0StDfB1TkLzDhPBvco m0gXoz8ymMhWVTnb67lIfhjnmclYHrh6++lSW268xvGbg2fGW65QrHCkORp2HUA8uoqv ScTXLNy+w5X7kcvUmzO5/jTMtWnnsGeh9iJqPgEyb3tG0lQLzGDRYDRsTUIwh5WCIf1K nMYs6nJQzqYazxMdDXyjzP21V8THFz2CEIy2VTB1J+KIE5ZgXIA22Ntf4nGNNw/XmRKF Lbog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=7sUENLoCJCYs1MSYcCbbd75YbMDrAHaelawSM1l7SHo=; b=kdH/HKXa9/mZ1bQ6HhPdTGsHiVYUY2GFxSYMjEtIkj1XK8Tv26sgTvG2R0+0RVQh0U 3JqO3m8RCjfgj9rOwaui6E5y60UT09aWJdz239C6n7zbfHf94e7OUrAPpsuDq5i6Hdyg 2FlXoal/IEG1/GA9wdHy9ugiftkce7FrOeEvw6QZWy+B2pUr5CkNRDmpQQPWymav9ys6 YVQ4zcD7MgFQ73nxAUQ9p4ZTh8m58m557g6hiwCZp+tzowu0dP2SiZCH3Fqh8Acsb1ZJ 7dyMhNwICCZQyp7kyo8MsRxlnWvGhLRhjYwX3Aq4akihr4NKcEdUZNGmWwL9x7bbjOZv 47iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=U83b2tqK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s42-20020a056a0017aa00b0051873a6f9ffsi12589846pfg.265.2022.05.23.01.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:13:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=U83b2tqK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 06DF522C90F; Mon, 23 May 2022 00:08:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347536AbiETJHJ (ORCPT + 99 others); Fri, 20 May 2022 05:07:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347551AbiETJHE (ORCPT ); Fri, 20 May 2022 05:07:04 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BAF414043C for ; Fri, 20 May 2022 02:07:01 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20220520090659euoutp01e8c8e6c538f336b92b1bbe0ed4697009~wxPTi9r-81508315083euoutp01- for ; Fri, 20 May 2022 09:06:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20220520090659euoutp01e8c8e6c538f336b92b1bbe0ed4697009~wxPTi9r-81508315083euoutp01- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1653037619; bh=7sUENLoCJCYs1MSYcCbbd75YbMDrAHaelawSM1l7SHo=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=U83b2tqKHnKKza0eNrjooK0Gqmpuqkt3920Uitjbn4gdgQQdjZU7jem4VnboYRXna ArdQRocEFlAEG9LIitKHQtNlq0D5G5/Ak6NfWqOGBVJb4fDDI0Upxui8KlE5l8dwMd AfAQPCPWAr0TiU9OVIrPc60cAsNJb9StPy9f8Ous= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220520090658eucas1p19241042c1d4d4bf5821401c597a1af02~wxPTNJ9M-0637606376eucas1p1x; Fri, 20 May 2022 09:06:58 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 42.2D.10009.23A57826; Fri, 20 May 2022 10:06:58 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220520090658eucas1p1b33f4cb964566691674c4b015509ceec~wxPS0eI0V3138931389eucas1p1D; Fri, 20 May 2022 09:06:58 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220520090658eusmtrp1fc09ac06a8697122e1bebb8cc020ff52~wxPSzj_us2148821488eusmtrp1T; Fri, 20 May 2022 09:06:58 +0000 (GMT) X-AuditID: cbfec7f2-e7fff70000002719-2a-62875a32e7b5 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CA.BC.09522.23A57826; Fri, 20 May 2022 10:06:58 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220520090658eusmtip198be26f25d7bc7783e6b666edad5d54a~wxPSqRLcC1273112731eusmtip1c; Fri, 20 May 2022 09:06:58 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.20) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 20 May 2022 10:06:56 +0100 Message-ID: <2252c3b2-0f65-945e-dc39-c0726bce72e8@samsung.com> Date: Fri, 20 May 2022 11:06:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets Content-Language: en-US To: Johannes Thumshirn , "dsterba@suse.cz" CC: "axboe@kernel.dk" , "damien.lemoal@opensource.wdc.com" , "pankydev8@gmail.com" , "dsterba@suse.com" , "hch@lst.de" , "linux-nvme@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "jiangbo.365@bytedance.com" , "linux-block@vger.kernel.org" , "gost.dev@samsung.com" , "linux-kernel@vger.kernel.org" , "dm-devel@redhat.com" From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.20] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFKsWRmVeSWpSXmKPExsWy7djP87pGUe1JBi9uGVusvtvPZvH77Hlm i73vZrNaXPjRyGSx+Pd3FouVq48yWfQc+MBi8bfrHpPF3lvaFpcer2C32LP3JIvF5V1z2Czm L3vKbrHm5lMWBz6PfyfWsHnsnHWX3ePy2VKPzUvqPXbfbACKtN5n9Xi/7yqbx/otV1k8ziw4 wu7xeZOcR/uBbqYA7igum5TUnMyy1CJ9uwSujL9f7jMVnOKuWLbqIksD40TOLkYODgkBE4kz P7O6GLk4hARWMEocOzSLDcL5wiix+PURFgjnM6PEtv/3gDKcYB3fT/2CqlrOKDHjbD8bXNXt TV+YIJxdjBKTlz5mB2nhFbCTeLS1A8xmEVCVWLNwJSNEXFDi5MwnLCC2qECExLRZZ9hAjhIW SJHYsbIIJMwsIC5x68l8JpCwiECUxK93ASDjmQUOs0psOnuOFSTOJqAl0djJDmJyCsRKfP/h C9GpKdG6/Tc7hC0vsf3tHGaIj5Uktv0ygXilVmLtsTPsIBMlBO5xSky88Y0dIuEisX/2IyYI W1ji1fEtUHEZidOTe1gg7GqJpzd+M0M0tzBK9O9czwaxwFqi70wORI2jxKVvn6H28knceCsI cQ6fxKRt05knMKrOQgqGWUj+nYXkg1lIPljAyLKKUTy1tDg3PbXYMC+1XK84Mbe4NC9dLzk/ dxMjMPmd/nf80w7Gua8+6h1iZOJgPMQowcGsJMLLmNuSJMSbklhZlVqUH19UmpNafIhRmoNF SZw3OXNDopBAemJJanZqakFqEUyWiYNTqoEpQ2Dqnx+JRanq3I1XvVZM2b/zQnodu4NsqUmX XmqfK8uDX5JOAs+Vc+YemHcy2eK67v+wuSrft+w3+LvQOc6W81LyAX7tt7WnGvdwsEa8nhp7 KSCKYyPrcl6bQPsrUf1F/itWen26xrZJKk6Q9522cO+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9XV1zy+fyr/d4Dr7tqTy59YC5oe+n5x 9vI5OUm3eKYdkbabvm67x4Nv37ddC+lXlgp5s2ftbgPOma8zprFs0o4O3j4l9v0BJk4tywL9 KcdaPO+8D/khVXjqWffhv1NOhF/+J+TBrR7F/YvvIGf+Vu4HzyQcPq//kmZc03uSIaYjzDVp xvu+6gm//fZ4u557nDol7bdqwr79l36u+Pax9c7igDkmMmlqVzTbZhZM/rEs8ejcjTZ/toRL vzXiOi/VZqZvmV51drLJUrO3kZsu7M/mzT3r5+Zkt/VtxwJVCR37c4pTXulc82EJ29StxFKc kWioxVxUnAgA6L2ujKIDAAA= X-CMS-MailID: 20220520090658eucas1p1b33f4cb964566691674c4b015509ceec X-Msg-Generator: CA X-RootMTR: 20220516165429eucas1p272c8b4325a488675f08f2d7016aa6230 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220516165429eucas1p272c8b4325a488675f08f2d7016aa6230 References: <20220516165416.171196-1-p.raghav@samsung.com> <20220516165416.171196-9-p.raghav@samsung.com> <20220517124257.GD18596@twin.jikos.cz> <717a2c83-0678-9310-4c75-9ad5da0472f6@samsung.com> X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > Thanks, > Johannes