Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp107340iob; Tue, 17 May 2022 20:25:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo09xU4j/f76xnCfXPMA2LaoatgOcKZRvbxp0r6DWkZbN97q07fEJoxu3kaKKc99ftprTQ X-Received: by 2002:a05:6a00:e0e:b0:50a:cb86:883c with SMTP id bq14-20020a056a000e0e00b0050acb86883cmr25769581pfb.11.1652844319240; Tue, 17 May 2022 20:25:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652844319; cv=pass; d=google.com; s=arc-20160816; b=gRaiKolUgNLPmGowZ7/zUjxDnoAeXAxaE8Pszzb8g4EdDk5RfAQmhizQf8tDQPEx8R fxfgmBp/qxCAf9VIsH5kHZKGwYnkEGplgjYpErXGiJLvk9h6nV32jWhKfX3craZcJRg0 fmUaqo1WqWr3+UeOaKWa/kdb4gaNosQCkxKoK0qJXgbz5FvpMA55AaC2JEAlX1m3VdOE +x8EYO9SqSI/BZ1EvQ1ot8WlSOCn7lQSYldYLYA4OWgDa/UZ8PL8laGRF/mGB4bV0hPp 5vPsLQsBgkfo0aNZyTgn9OVW+wz9IvmmlKzsrNrs1SdPtrFiSvDM7w18eatRNsFeWwkC 4LWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=SojUIEYqe8cfBdXstKGR0BVYqNq04WIKDI4XcGvedjY=; b=BJ5F/dB1SYvMBGfATuOsIjtVbec2Q6LsSpuh7IYOrwDUzv//y2MmpfT9fJ110QbAZu 7/LkzzT/b0goI/1YdYSAQh+44P6bc+We/NTvOBJdiisyypNn2c10QNsFZYYccT/Fkj8t 5t8YWHsTEhLpLi4pHIgKJ+0biZYNyME3qmYWRTtb+X4hg/MAep9TJjWPFtcHm5YqvxPF 1VnYRdpcfSTHCd8kC95eSQTh4n6LNV0tmwyLA55gOiS23R2eOOGxctrtjMpkg4AXA4dO 0nW2iDwDhhV5d6+zIuvMLw9NFqPRk4bmiNrI9DxNRr2uoGvsPfZFHdi28inAyD+dpLD/ e17Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="m+M/6uW0"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=dAzsOlhH; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d8-20020a170903230800b0015ea24823bbsi1172355plh.535.2022.05.17.20.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="m+M/6uW0"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=dAzsOlhH; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 371E35A5B9; Tue, 17 May 2022 20:21:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233130AbiEQGvv (ORCPT + 99 others); Tue, 17 May 2022 02:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240753AbiEQGu5 (ORCPT ); Tue, 17 May 2022 02:50:57 -0400 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0D411C2E; Mon, 16 May 2022 23:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1652770256; x=1684306256; h=from:to:cc:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=SojUIEYqe8cfBdXstKGR0BVYqNq04WIKDI4XcGvedjY=; b=m+M/6uW0Z8HNqe51nFUAaLGs+UHWiMX6tmEfVGcPWhJKeWe+6bG3jB/9 sWK4uour1eOH5sfq60o6599kK/A76ZxnA787i2HWUMv0jfAUoiOufQH6N rWQnLmmyfqYz21C14Pkc27T1H9rRjgOpBzoLMrRBZ7F/uiKiSOdKqaTOc jxlF9R/bilaNS6cOlYNjpV1HapN3tV5sD1W2aiNyKVCU601LIcYXQwC/N FW0anCBsjE11z1qsaLuh/9P1AqwDiiV32J9fQ/crvCX3O7/W33QKa6+Xm 0Pi5yQPFkoLFQ5u5HuXcjKlx98PGD7KAI/L0rdDb7M/8D2lBoWkpoj5JG g==; X-IronPort-AV: E=Sophos;i="5.91,232,1647273600"; d="scan'208";a="205395433" Received: from mail-mw2nam12lp2049.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.49]) by ob1.hgst.iphmx.com with ESMTP; 17 May 2022 14:50:54 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L3yHctORlJQqd2Mc8094MnIqVNi+iyf+yY0kn6yC40UBEAIRZoYGDii3JvWQOUL6+lVIhQYWqRQosT5rCwUfRuiUVGqGHIyeMQ4Deb8C6yxQJNu/8niCDEDdSbhKmXWNaEeZd7XjI7IhTk/LtMQCPtTHRsHkKwrGbra2FiMSlBlbZy2Fkp23tFu0nAV9yQ/xrf8ukukX5XY2KnhA4QAi46uQozAsMbxQ7ZrsZs/s2BawSMNVPHXPaCLOI+HzWiVx8HNJ+CKQCinv1svGhkO0lxEiXgIyFV5bJgZY2N6M1LE5WzJ/nAYBeVlv5oYmhIClmiyG/koCoh2N8Za+joxb5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SojUIEYqe8cfBdXstKGR0BVYqNq04WIKDI4XcGvedjY=; b=Tp3XLE+LYzNcm5gEEBoucQuvy1JU/SA/Ff1tMb/HwuyhEPuIcprNgmZn+GXwnPS45y2IwrKUpCcZO3zKi45OFeu8mukzIXcKELN+Au2GN7zMTSbuzrKIXImdxbpLe2oz4pwBO6o26sH6P2sQbRbl62t7Adi9bHJIMGdtngGR5W7sTLi8yR25zu2E9rTV2Gc0CZnzLI+aEn5fhYwTOUo/dlODi5xclKVGya5M/QEEBxr5CWZjZ1q3Ilr8VijYKtZuwrHIafZEGCW55ijPMSrYghfYEMNJfCfjVRiIiNfHZv72TqRQlfSwq6DCfPGJk5bQIS3OS0tGyuAkNoSp6muAgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SojUIEYqe8cfBdXstKGR0BVYqNq04WIKDI4XcGvedjY=; b=dAzsOlhHVE4JrEK4DbzXZ5QrUSBmxBusJbkaJoM9dc2niukuea37c/2Mh6NSlJ3deOcdv3Mbea+hKjDEQQ4bUaVIdxVmKJW8EQ2BBz1wA0WcXJ5Y2U2svaDkpImUK1DO7/F+QPgYoKp6djo6q3nuMsjx6Dy/ZUXmcPgys8Xe9ic= Received: from PH0PR04MB7416.namprd04.prod.outlook.com (2603:10b6:510:12::17) by BYAPR04MB3816.namprd04.prod.outlook.com (2603:10b6:a02:ac::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Tue, 17 May 2022 06:50:53 +0000 Received: from PH0PR04MB7416.namprd04.prod.outlook.com ([fe80::6cfd:b252:c66e:9e12]) by PH0PR04MB7416.namprd04.prod.outlook.com ([fe80::6cfd:b252:c66e:9e12%3]) with mapi id 15.20.5250.018; Tue, 17 May 2022 06:50:53 +0000 From: Johannes Thumshirn To: Pankaj Raghav , "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" Subject: Re: [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets Thread-Topic: [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets Thread-Index: AQHYaUWvGG/TZMkJWESbmBi0yiTiyA== Date: Tue, 17 May 2022 06:50:53 +0000 Message-ID: References: <20220516165416.171196-1-p.raghav@samsung.com> <20220516165416.171196-9-p.raghav@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wdc.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e6b3a256-a096-41fc-a1e4-08da37d19607 x-ms-traffictypediagnostic: BYAPR04MB3816:EE_ x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ilEEZpH79JHFziUm8Q4NyZFseJATqR+wtA8xnQ+asOD93BwFwQ3u+sRGho7+TzVDl2Duzb11eeypdNyMgRT6Hrrx9uiqJFUaVuXF4I6e5S68QGnJnlLA4XaEs1zKRpyfpXKm0MhkZ8Op13CI0/NxVA88NB4FZyVVdd+Ncz5dfihtwSPTM9s8EQWDgDuUmnr9F9FVBoySwBSrKZhOxxp7xQyRKZjjvb+wfLCbhupbjQrRIGpRqBXq1rV5ciYf1CGicAgFVt99b8lE+HFxbxpijG32ja73OV+N1G0dFE+pn5ZJ0AUrMDLWU0roQ0I3sqGgGQOxEWfIcWPUxnRbAkVHFJOmq2vusFuCvLV034ndpW2CZQXob7Pw6urlZcgMiHbg0/xvTDuykxevhSCJYd5gzJ3vA5mNS2A9vPaPhMxFbMJD8ZQ2SInC0ZE51yGSCQZBc3bMJjx3Y+AbcZ3rwEEE0m+uAd3hnfs1ZcXEDqJ0XyW6PNa3GGpM+risnoDmIjkv9FMNCMnrduy1CMHG+8Zf2Pe50AB3clAAJILxFxauhJe3n3hvMBe444w4hunNHNSJkETIW6hijrwW1mw0PQ1AQX3UJY3kgBwEfcmpy7P5dFygzNBFrVrnQn9Cr6vuvQPNVD5TAoHK6Ic94hpeyZDrNZkOc+bQSWvdpZH64PGa4RKSrzNJKSR1NpOAfhpdt6cdeT5OxLhuvSG/LwSYE3KwuA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR04MB7416.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(122000001)(38100700002)(8676002)(64756008)(4744005)(91956017)(2906002)(66476007)(66556008)(5660300002)(86362001)(76116006)(7416002)(66946007)(8936002)(508600001)(38070700005)(186003)(55016003)(33656002)(53546011)(54906003)(316002)(83380400001)(9686003)(82960400001)(52536014)(71200400001)(66446008)(110136005)(7696005)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3LZ32nKeZjXeywVwc45a0jMJgEncxtOq8Y6/gge5jVaYLqzmeDqAcZ5eVhvY?= =?us-ascii?Q?ZtrC4a2YVcax0Na1WjvSYueRVK1Rhaq6cPLKVHWG0SqrOabK9v0e1PcVpcxf?= =?us-ascii?Q?KnyD6Dfsqd+Hpd6jraaUFJToEMBJTyFBjq9cWlGCWy/6Lyaefu+kPS/yR7jG?= =?us-ascii?Q?QOwlPWY5cUYq8h7jrrWScHP8woQOklg+aCG7TQhaRq/pH3Z5UNK9BKa6ZiU1?= =?us-ascii?Q?qYPmCTtEw5ZFIroMkjNGAsjTMjybZaPkLbn9rqPYgs9WxG+YNr+Wope3hVb3?= =?us-ascii?Q?LPo51Zw/akHtv3wI5ZHqGTMXmu+lKvVhcDXneHqu5C8/pCWdg2C/BnP6c3kh?= =?us-ascii?Q?UeThEGX/YpSGo+TsV6fb68XLb15TUYh9i6BEqcbyfUP7Kr/OUsSXdbGSq2sU?= =?us-ascii?Q?JwFMlMTuvN/P3jHuiVP7UMG79VsqphI9YdcWZtmZ3hQGXit0wsZrk/gk8kWu?= =?us-ascii?Q?FD+Xx1SY+XbI/BA1bQ4K8qp/XoaZCwmLNY9cwdKSh0gjzX3fkWGv89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XdKr79zxad6YEEVX8Y6W41UV+nan3zH5gwKgtPNHjl9Y?= =?us-ascii?Q?Y4NcDtcV9ui9VRXDFtuF6/v/7Emh1rBfLCUGxtbs+EJr1nuWsKXbi17of6v8?= =?us-ascii?Q?V9wqm3d/mpfqznatSkiTWlBbYjs48SfxzV5IAfsisnyJzoOATO+9SFRoDyjm?= =?us-ascii?Q?fhnwY/5Dqx86ESLafSnjrwwPOjTWFOaSBEECIzUtCgfYAnyNAx/5pf3aOU4b?= =?us-ascii?Q?52XndwHzXZRDy4jG1apMXSkblA2KzCx6bJi4Qqh+j8+pCQIzwb06YMcbAe4J?= =?us-ascii?Q?IADir7ln7T3S8DwK0oeBDd8JMkWhirXKxFX14zTdcsYQiYnunHw/nZfqZfVm?= =?us-ascii?Q?mmnrLRTrI+ceNeIVZKO4mPiFKmTFJsQjwJ7PQU1X/NFI6NuaqPo99GJk+azJ?= x-ms-exchange-antispam-messagedata-1: pnBBFb1WuvaMgZ0F9Mv+JzYTg/j0JU6pPfhVkG/fAqrmhnqv7d5NaSLu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR04MB7416.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6b3a256-a096-41fc-a1e4-08da37d19607 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2022 06:50:53.0809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qPBszXRcKXTXObgPvRC03m/V0GqF+ED729uih601hETzqTRx9MZrV3SOBzbgAl5kh+W8x8F1oRU0Q2qAwj2mjJ18LrKjjONQECiwNmrJxaU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB3816 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 16/05/2022 18:55, Pankaj Raghav wrote:=0A= > Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB.= =0A= > These are fixed at these locations so that recovery tools can reliably=0A= > retrieve the superblocks even if one of the mirror gets corrupted.=0A= > =0A= > power of 2 zone sizes align at these offsets irrespective of their=0A= > value but non power of 2 zone sizes will not align.=0A= > =0A= > To make sure the first zone at mirror 1 and mirror 2 align, write zero=0A= > operation is performed to move the write pointer of the first zone to=0A= > the expected offset. This operation is performed only after a zone reset= =0A= > of the first zone, i.e., when the second zone that contains the sb is FUL= L.=0A= =0A= Hi Pankaj, stupid question. Npo2 devices still have a zone size being a =0A= multiple of 4k don't they?=0A= =0A= If not, we'd need to also have a tail padding of the superblock zones, in o= rder=0A= to move the WP of these zones to the end, so the sb-log states match up.=0A=