Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3706705iob; Tue, 17 May 2022 05:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3ply04DMOjDn3BQ5g5jzcdLEZd+uFYoEJt0uNNQNToGhnSJ14nNKE9csLk9cOAh1o+dFg X-Received: by 2002:a05:6402:43c4:b0:41d:9403:8dca with SMTP id p4-20020a05640243c400b0041d94038dcamr18283817edc.184.1652791975223; Tue, 17 May 2022 05:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652791975; cv=none; d=google.com; s=arc-20160816; b=RA5QEzG6L7nF0Pmuw57qD0NmemaPl3jx0PWEEUaPXTNwHlvkHgX3UcnTDz3FiXZCCN Lm/H2o4DV2AoKxFc7VkNbusg+A0iOnQeQh5yaBqTIoKSTA36APRsLCik//bbTn10pRLw KH2aMJwOsr4PpNbN99tanBbRjBtLbsharo4wQoC8F+m7+qcj/JZUcKW/v4jHrt2aqPht b+63M9elxp3avaGz7Bxi+lpizzWXPMrvkHCgyL5JhtfFn9OcwX3drhHfxKUXA80pMSIm rU9lSMLGHQDgzSAZrEiTQ/fg8a9vcGN51gmKCT1eSEh4J4vJjOgQYAQwyyKO4G52oMz6 kN9g== 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=yglOEuSU1lFPYZ9DIoa/RozAcsJgPnXMY812PmqC9rM=; b=scsorCNoYY5ioQLD851AOvm36ZjYHD7iTCbsHayc++1Ux5cbfQmQMCnz+6b5vHkBNK EHUs5UCRyYqFuNhMzyo9vKX37BbRXFMRi1oxfXjAviErOBVmQ4RfoLTxhkK+0Sv4GpYP vq5HngGYlkcICJffwb4X1XI4Cq10QNxqHzeZBWV4TqFYaLctwUhPLlQpeNQ+c2JrCPrf uk56gZI/uEPHeuXyzk5rS3TGhaPiPsRwaLBrT2TcQPxafqrwEWDmH8e8kn3ur/+mZCs/ Rp+W4TVm/SCpvZxAs8fOH03KbmQisdCWtoRmlYGGrTyf7u+yu5NoED2+uEscgxedjusp i50w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KdrOyalv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd23-20020a1709076e1700b006f3ae10b8dcsi2914631ejc.402.2022.05.17.05.52.28; Tue, 17 May 2022 05:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KdrOyalv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242248AbiEQIAy (ORCPT + 99 others); Tue, 17 May 2022 04:00:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239852AbiEQIAs (ORCPT ); Tue, 17 May 2022 04:00:48 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 116DABB4 for ; Tue, 17 May 2022 01:00:44 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20220517080042euoutp01665a76c6e8a00e6db3b9fcac6ca4efe7~v1Zlcs4vA1479914799euoutp012 for ; Tue, 17 May 2022 08:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20220517080042euoutp01665a76c6e8a00e6db3b9fcac6ca4efe7~v1Zlcs4vA1479914799euoutp012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1652774442; bh=yglOEuSU1lFPYZ9DIoa/RozAcsJgPnXMY812PmqC9rM=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=KdrOyalv2M25US8CNt7D8QdtJI+uk+zopvXERKtIxyLZ14iZYKeb/RCzDavpXrOU8 /dN12LYP4zNoMVwajK6mOubcCKXa2bVCcwZtzcY1kxDnopyE1vsPAkD9S2jNu1IOXT SP1hlK7gHL+B4ui7CdMgmrTEX9L3vbkM/26F7E/Q= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220517080041eucas1p24bc8b50fe287967bcd8dc73669c11d32~v1Zkg2fD-0241602416eucas1p2j; Tue, 17 May 2022 08:00:41 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B6.44.10009.92653826; Tue, 17 May 2022 09:00:41 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220517080041eucas1p227e0a5d81f7b9b018c2e8f38b74d3aff~v1ZkEScpL1149811498eucas1p2k; Tue, 17 May 2022 08:00:41 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220517080041eusmtrp25e844b307bbeb73179ae75e18bd42416~v1ZkDZe662741427414eusmtrp2B; Tue, 17 May 2022 08:00:41 +0000 (GMT) X-AuditID: cbfec7f2-e95ff70000002719-1f-62835629f1a7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 26.48.09522.92653826; Tue, 17 May 2022 09:00:41 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220517080041eusmtip14c1a1beb38bfd07fa000460be6ca25fa~v1Zj2h0za1378313783eusmtip1b; Tue, 17 May 2022 08:00:41 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.7) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 17 May 2022 09:00:39 +0100 Message-ID: <8fc4e862-fa89-2d8d-b340-27a6465b59ca@samsung.com> Date: Tue, 17 May 2022 10:00:38 +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 , "axboe@kernel.dk" , "damien.lemoal@opensource.wdc.com" , "pankydev8@gmail.com" , "dsterba@suse.com" , "hch@lst.de" CC: "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.7] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMKsWRmVeSWpSXmKPExsWy7djPc7qaYc1JBqf3mFisvtvPZvH77Hlm i73v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duZ6fdryvXKwl9Ej13V0dxqcme3ZnTNn8+McObaUXpVt+rq9j4mnbwfHJj2Ry4 xLS2V7/U6sbd7eZP7UO53l7Q/RMR96JDW/FO+sLN5xaGLft767ipEktxRqKhFnNRcSIAYEKl 5JsDAAA= X-CMS-MailID: 20220517080041eucas1p227e0a5d81f7b9b018c2e8f38b74d3aff 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> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,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 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.