Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4918840iob; Mon, 9 May 2022 04:53:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/9N3EDfzb2CeHGart7AN0Bkr+SS1R9L18ujb3SojaGozo0v7Sa3mhbl/z36gZ3BH66ALC X-Received: by 2002:a17:903:182:b0:15e:8de0:2859 with SMTP id z2-20020a170903018200b0015e8de02859mr15821237plg.124.1652097182294; Mon, 09 May 2022 04:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652097182; cv=none; d=google.com; s=arc-20160816; b=00y8uj7dxPKzRJpNW9sRXbYHaSKuFfjtR7h76+u4vWvArsIiEHFC99OImPQPlvUkru QFcOSIJYXQOEb02MF9MiLa50hHk65oNyM+N5c47gDXQHs0cDIrTUeoSakUt+HZGE50Kw +5ewRrwqbXBUua2p+cOCy7gm6h6o4tCiyHGSKZYBsQWvMOa+zEgDZFpG/7d+DuBJawrF efH13qym461zMqs20sBwnLIr491U4eAF6LAO9cQniHEeotYB1e7lHimL4oFTM5BN2Kn2 DmvuuDDsAJ3o7I8qNqNiXKTbmhpZlXjvKyhE+JlyHOdX2GEB19mi9J1ZZ6a/ZOfgCAp1 ckwA== 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:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=eRnf0CoH5S13LsLZ+gUV4c+ed3W57A7GuWCrr3sgnIo=; b=tCLShBKbD2uvcG7vfVr4YnZ6AnUVxFNQuxihV/pduLPoh0BU13HlROlFnaeP1hwFvW I0+0TmvPS4u3QiYHn7UuXIOArtZMtYXXry12UUMmEU6ht8Rz6T24g5FfG3CocwdDqcy3 TIXNfZyYxq5DSx1bVp0YWP4Ere8GCGHa7x1HFPwQpq+MKnnW+aKxpiG895ton25f1+G/ i3sQx32XLTNNj9ABy4zeIFoeAhqbqJ3rj9OeQ4w4rle3dbdjLyZPe9+eDHZyqRAoLOyT fI0srtC1C7WeMvXaI4bqbEu8ntSSp7BwBM73pyQBKFzn5lfXTe6O/LA/UmrT+ANANu4D qBtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=C2KdSO3N; 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 np2-20020a17090b4c4200b001dc0e67214bsi22606142pjb.187.2022.05.09.04.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:53:02 -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=C2KdSO3N; 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 CF38E233A64; Mon, 9 May 2022 04:02:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231634AbiEILGb (ORCPT + 99 others); Mon, 9 May 2022 07:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbiEILG1 (ORCPT ); Mon, 9 May 2022 07:06:27 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32DDA22A2C9 for ; Mon, 9 May 2022 04:02:33 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220509110231euoutp02c1140ee3ba2df639112d087578028ada~tauCj5vNA2728127281euoutp02- for ; Mon, 9 May 2022 11:02:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220509110231euoutp02c1140ee3ba2df639112d087578028ada~tauCj5vNA2728127281euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1652094151; bh=eRnf0CoH5S13LsLZ+gUV4c+ed3W57A7GuWCrr3sgnIo=; h=Date:Subject:To:From:In-Reply-To:References:From; b=C2KdSO3Ny3yn2BBrMvJBgM6QAcEz1k6M5zTBDCpVAzatXp/552glV1roZ14kxS1VO mxS8a4YApT+Ns1Ta1PYec+La4T8knbMEqJ4t0s42GS1m1PtVv65YihMR/yvSWPfQcp Oekkj0IVMBjmOpZthQb3RcpGgWfAR6G85MRU0rBg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220509110230eucas1p2bc1a54ccf4681a1cab65ccec40854f50~tauB8kytl1526915269eucas1p2W; Mon, 9 May 2022 11:02:30 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id BE.10.10260.6C4F8726; Mon, 9 May 2022 12:02:30 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220509110230eucas1p13e606c51930d58a88555e9c10ddc0095~tauBZ0unJ0402604026eucas1p17; Mon, 9 May 2022 11:02:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220509110230eusmtrp11af182cc213b7913b637d177288f7a8a~tauBYoRRA2398323983eusmtrp1z; Mon, 9 May 2022 11:02:30 +0000 (GMT) X-AuditID: cbfec7f5-bddff70000002814-98-6278f4c6cd7d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1A.4A.09404.5C4F8726; Mon, 9 May 2022 12:02:30 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220509110229eusmtip154a297efbad58824866a49dc0219bcbb~tauBMVgfz1376713767eusmtip1-; Mon, 9 May 2022 11:02:29 +0000 (GMT) Received: from [106.110.32.130] (106.110.32.130) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 9 May 2022 12:02:28 +0100 Message-ID: Date: Mon, 9 May 2022 13:02:23 +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 v3 00/11] support non power of 2 zoned devices Content-Language: en-US To: , , , , , , , , Chris Mason , Josef Bacik , , , , Jens Axboe , , , , , , Naohiro Aota , , Johannes Thumshirn , "Sagi Grimberg" , Alasdair Kergon , , Chaitanya Kulkarni , "Keith Busch" , From: Pankaj Raghav In-Reply-To: <20220506100054.GZ18596@suse.cz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.110.32.130] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA01SfUxTVxzN7Xt9fXS2PIqGK7CQVVGp4Wtj5C4jZANlL9M/TAzJdHFbkRcg lootMAZzlKFuIqO0CrqKA/kYl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sSQ1OzW1ILUIpo+Jg1OqgUnytc+ZJTIRTpWOMzxXHFJzrH6i9rUxoGv/ HRnttxeEa+zOiTtf2DZt6Xtrf0fZJ1v5dhabvV96ftvl1W/SpIpFGmNkbIR6FjyevGrKLfFU Mfu5PX49a0ptmfuDtH9s/eVZeDvovERPtdOqF07vE8W0twuw/pi+ONmE7c3KmglNXjo7zpmF b07VvaHy+NMXxy7+85/KTi9ePWdFRmOk9/XksBeTwx9H6E98aiJV+oGbvyot+9/M2NLf4eo+ /jLe05bk2F7fwcLFdP8p6+qZAm9UPfYLv7+44F9FH3/lfMkXt3dYHnzoFsVyQOO26/e95w8Y zO+NZGr9pCXZkfJQ4ezy68+5BY8xGWb2vg080qbEUpyRaKjFXFScCADdeNjb8AMAAA== X-CMS-MailID: 20220509110230eucas1p13e606c51930d58a88555e9c10ddc0095 X-Msg-Generator: CA X-RootMTR: 20220506081106eucas1p181e83ef352eb8bfb1752bee0cf84020f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220506081106eucas1p181e83ef352eb8bfb1752bee0cf84020f References: <20220506081105.29134-1-p.raghav@samsung.com> <20220506100054.GZ18596@suse.cz> X-Spam-Status: No, score=-3.7 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 2022-05-06 12:00, David Sterba wrote: >> The current approach for npo2 devices is to place the superblock mirror >> zones near 512GB and 4TB that is **aligned to the zone size**. > > I don't like that, the offsets have been chosen so the values are fixed > and also future proof in case the zone size increases significantly. The > natural alignment of the pow2 zones makes it fairly trivial. > > If I understand correctly what you suggest, it would mean that if zone > is eg. 5G and starts at 510G then the superblock should start at 510G, > right? And with another device that has 7G zone size the nearest > multiple is 511G. And so on. > > That makes it all less predictable, depending on the physical device > constraints that are affecting the logical data structures of the > filesystem. We tried to avoid that with pow2, the only thing that > depends on the device is that the range from the super block offsets is > always 2 zones. > > I really want to keep the offsets for all zoned devices the same and > adapt the code that's handling the writes. This is possible with the > non-pow2 too, the first write is set to the expected offset, leaving the > beginning of the zone unused. > I agree. Having a known place for superblocks is important for recovery tools. We were thinking along the lines of what you have suggested. I will add this support in the next revision. >> This >> is of no issue for normal operation as we keep track where the superblock >> mirror are placed but this can cause an issue with recovery tools for >> zoned devices as they expect mirror superblock to be in 512GB and 4TB. > > Yeah the tools need to be updated, btrfs-progs and suite of blk* in > util-linux. > >> Note that ATM, recovery tools such as `btrfs check` does not work for >> image dumps for zoned devices even for po2 zone sizes. > > I thought this worked, but if you find something that does not please > report that to Johannes or Naohiro. Ok. Thanks.