Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp530740iob; Tue, 3 May 2022 04:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJYZDfYPSOdXh5/sK0FvoY79mJhV5oBZbVX89oeaba13hpaY/HPRqvqtKO9Xy+PObGZuyx X-Received: by 2002:a63:6d0c:0:b0:3c1:7361:b25b with SMTP id i12-20020a636d0c000000b003c17361b25bmr13262985pgc.449.1651576596243; Tue, 03 May 2022 04:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651576596; cv=none; d=google.com; s=arc-20160816; b=euszvLes23uPA5KFNoQ9NildL1XOYWt/AP6Z4yUhXFUkoODmsYnld7F5Pr/7cjV4EU N5q6g7mbApRcBJsKxlpVhJHf8c88Gk3fgkQOAzWDNt/KNG1osuPskYtri0GbJoangbHd 1A1dxKZek1QCTpPZT0NMqVArb4PES1k8tqWHPXYvKc3oMaMcovVr7zktuUwRMahtoEV2 9DvO25SVQzRTIUbAh3bnD/4TNUOdqqWDFGQnzZtZJpBm3JOorjNYEsBXHNgy5c2xhvPp Wve16WIAEhN37ZsJ4CMKeFsztshQGRis7ZdS6/T41dywtfmf3x7MoYNsyXD3WuvpMb+F Yutg== 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=IRf3vJRWgQgo7b9PQAgoElxFlgi3dHo9QSeeAL1/pvk=; b=ONLsySVVesLghvCMGd3CGpQI4fJD6zYKZyzvWcBzVk2F1ARSDlfikW12FHx4/X8tnJ TNd3Ud3fMnN8jVhiNAFvJJgtNlF0zlwBPEPydfWLM8r1xcKdkTBdEJM4dzsscJir4BYD PvJXR1oKNfjOg6qDZsDW7KlgBVnuQvlfN3oZkzLfHtJvmezQ6MhudhyrQj9JCTNPkl+x 21m2HEevLoKKFJyveRZu27Pfp5Tsc/jcTPRmgJdQAvtnw0giO0o//YzKlLHTcXPLaofs uwIRXTMH96ILASIuyCPKS1UHBydRDEjGekvlN+wCbrnnlglcJkKUx3yMsend79ZxZ7SE pMIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WAUeVszz; 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 h128-20020a636c86000000b003aaf454f54csi14655047pgc.444.2022.05.03.04.16.20; Tue, 03 May 2022 04:16:36 -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=WAUeVszz; 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 S233284AbiECJPr (ORCPT + 99 others); Tue, 3 May 2022 05:15:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233288AbiECJPo (ORCPT ); Tue, 3 May 2022 05:15:44 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D28091A389 for ; Tue, 3 May 2022 02:12:12 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220503091209euoutp029d49958243382853a2564b34446e5492~rjV93vBUW1115311153euoutp02B for ; Tue, 3 May 2022 09:12:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220503091209euoutp029d49958243382853a2564b34446e5492~rjV93vBUW1115311153euoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1651569129; bh=IRf3vJRWgQgo7b9PQAgoElxFlgi3dHo9QSeeAL1/pvk=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=WAUeVszzWW7un0rLGOvQSUtwgzJkT0zfV3lFsVfU6kwYM7/aDAPK4K7wZHzft66kP TL19ob1LB4LKvFJj/eQjwYYagvBXwfUgfr0qrImN747RpJYIy+DJfkY8rrMNKtns3l daNko/D0mFUsNo3pdE0LpsG8NUXL7zGYLOxXT0Hk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220503091208eucas1p1ad5c611652cba012530519c5e24823cc~rjV9RGgOw0201902019eucas1p16; Tue, 3 May 2022 09:12:08 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 64.C8.09887.8E1F0726; Tue, 3 May 2022 10:12:08 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220503091208eucas1p1cea931169fd910bd02f1de6d79a10d3c~rjV82hCoz0339703397eucas1p1h; Tue, 3 May 2022 09:12:08 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220503091208eusmtrp2c917ae498f4cf3801576f009a47b084c~rjV8zlopc1059410594eusmtrp2Z; Tue, 3 May 2022 09:12:08 +0000 (GMT) X-AuditID: cbfec7f4-45bff7000000269f-65-6270f1e8de5e Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 23.F9.09522.8E1F0726; Tue, 3 May 2022 10:12:08 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220503091208eusmtip159597f8d3e9ac33c0b07ef5f593ee926~rjV8kr5Ci1917519175eusmtip1Z; Tue, 3 May 2022 09:12:08 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.170) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 3 May 2022 10:12:05 +0100 Message-ID: Date: Tue, 3 May 2022 11:12:04 +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 00/16] support non power of 2 zoned devices Content-Language: en-US To: Johannes Thumshirn , "jaegeuk@kernel.org" , "axboe@kernel.dk" , "snitzer@kernel.org" , "hch@lst.de" , "mcgrof@kernel.org" , Naohiro Aota , "sagi@grimberg.me" , "damien.lemoal@opensource.wdc.com" , "dsterba@suse.com" CC: "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "clm@fb.com" , "gost.dev@samsung.com" , "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "josef@toxicpanda.com" , "jonathan.derrick@linux.dev" , "agk@redhat.com" , "kbusch@kernel.org" , "kch@nvidia.com" , "linux-nvme@lists.infradead.org" , "dm-devel@redhat.com" , "bvanassche@acm.org" , "jiangbo.365@bytedance.com" , "linux-fsdevel@vger.kernel.org" , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , "linux-block@vger.kernel.org" From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.170] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0xTZxje13N6eqjWHaobn8WAgc0NFio6E78EAls08yjhIrtETIwUPFKy UrGFTSE4WHHMjktB7baKwowDBOXaCEVgG4Sb0NVwG+CsNW0j3koJlQxxMMrBhX/P8z7v877v 8+UjMaGeEJHJ8jRGIZfI/Ag+fqtn/s+gqZnUhOC2l2JUd6cHQzX3iwikdc5jaOCikYNKin7i oQWjCUPtjktcdPefHA66XtPNQbY6HYbyf3fi6F+1ebmW+xBDrx7uQCWdYwDZR3Uc1D75ARqy VvHQ0NV9qK29H0fDraUEKquw85DmuxcYGtfYASrubeKi2qfTOOqb9P7Imx4eiaAX+24QdLHK waNN5gacHjam043V5wj6l+yLGN107Rv6dvksh749kU3QBSoHQRvOPuDS0x2jBF2nH8VpTVMD l55t9InxPMwPPcbIkr9iFNvD4vnS+h+e4al9glPO+gYsG6jWqYEHCald8LJmAlMDPimkqgC8 fP4KlyUuAAeqKwmWzAKY21zDeW1prewCbiykKgFsefnZ/01XH1u5rNAK4AtHhBsLqDCY12Fe MeDUO9BQbOSxdU/Y/7MNd+O3qENQqxsk3HgjFQ5vtrpWlmGUF5y0lXHcCzZRLRicKLmBuwlG dfNg7auqZUKSBBUIc86tDPWgjsCK61qMNQfAs80LPBb7wubnpRibwB+eHx9ZTZMFb/YM8twz IWXhwzt3XavCXtjUqiVYvBE+6dXzWLwFLhnKVnsyoX18AWPNuQAWGeoI90GQCoGFgzK252No KbBx2fIGOP7ck71nAyy59SOmAe/q1ryFbk1m3ZoIujURygFeDbyYdGVKEqPcKWe+FislKcp0 eZI48URKI1j+2AOLva4WUPlkRtwJOCToBJDE/DYJ9vyamiAUHJOczmAUJ44q0mWMshN4k7if lyAxuV4ipJIkacyXDJPKKF6rHNJDlM3J2PxFkDXbIZ2bD45WffLeVMibuwe21eQRkWEHrL1F enPs4z2Bn4emaeOuNS8eMEjDCym7/3Dc0r0zIv/JU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cf 9Q4xMnEwHmKU4GBWEuF1XlqQJMSbklhZlVqUH19UmpNafIjRFBhKE5mlRJPzgck2ryTe0MzA 1NDEzNLA1NLMWEmc17OgI1FIID2xJDU7NbUgtQimj4mDU6qBSWv7S9WNHwXkQ2z7F83ZZLb5 2irRmZo7P8496uVr/nVSLqdho0HPxgBj67s8H7fdNTCbcTA3+ssq/ryO1rBPdx6I2x8/FmS8 xljyQvJqx/Pvb0YvbZj+v9ropMHcP+VL+q4aMWhxn+t3cJK/tLrtdo0Av9GO87tKG5k1Pcov Nre3s6/gVarldBFnq9admtpzP7cvUPbUS8n/fbwRros02bw598+3XP5e+8Hxto8nVI4snW4e rbH8VXtySDTj38m89QoFcjfzXn5cu9n8g6VElsl85tNVzLvrnXQCN264e/+qsf35TNW777yP a3scy60TDRVj0o5Yecbxx5tbt+2v37C8+0Bxin2KcX2ctvF6JZbijERDLeai4kQArWmSZP4D AAA= X-CMS-MailID: 20220503091208eucas1p1cea931169fd910bd02f1de6d79a10d3c X-Msg-Generator: CA X-RootMTR: 20220427160256eucas1p2db2b58792ffc93026d870c260767da14 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220427160256eucas1p2db2b58792ffc93026d870c260767da14 References: <20220427160255.300418-1-p.raghav@samsung.com> X-Spam-Status: No, score=-10.6 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 Hi Johannes, On 2022-05-03 00:07, Johannes Thumshirn wrote: >> There was an effort previously [1] to add support to non po2 devices via >> device level emulation but that was rejected with a final conclusion >> to add support for non po2 zoned device in the complete stack[2]. > > Hey Pankaj, > > One thing I'm concerned with this patches is, once we have npo2 zones (or to be precise > not fs_info->sectorsize aligned zones) we have to check on every allocation if we still > have at least have fs_info->sectorsize bytes left in a zone. If not we need to > explicitly finish the zone, otherwise we'll run out of max active zones. > This commit: `btrfs: zoned: relax the alignment constraint for zoned devices` makes sure the zone size is BTRFS_STRIPE_LEN aligned (64K). So even the npo2 zoned device should be aligned to `fs_info->sectorsize`, which is typically 4k. This was one of the comment that came from David Sterba: https://lore.kernel.org/all/20220315142740.GU12643@twin.jikos.cz/ where he suggested to have some sane alignment for the zone sizes. > This is a problem for zoned btrfs at the moment already but it'll be even worse > with npo2, because we're never implicitly finishing zones. > > See also > https://lore.kernel.org/linux-btrfs/42758829d8696a471a27f7aaeab5468f60b1565d.1651157034.git.naohiro.aota@wdc.com > I did take a look at this few days back and the patch should work fine also for npo2 zoned device as we allow only zone sizes that are BTRFS_STRIPE_LEN aligned. So even the max nodesize for METADATA BGs is only 64k and it should be aligned correctly to implicitly finish the zone. Let me know your thoughts and if I am missing something. Regards, Pankaj