Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp558789rwb; Thu, 11 Aug 2022 06:24:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nEtKaud/C79a96Fwq52LoRh4KW5dU+sE/H7BSPr2dcLyMYRUGZfuHf1dW7uDuYpzrGCjW X-Received: by 2002:a17:902:e891:b0:16f:a8:9b9c with SMTP id w17-20020a170902e89100b0016f00a89b9cmr31928365plg.8.1660224291326; Thu, 11 Aug 2022 06:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660224291; cv=none; d=google.com; s=arc-20160816; b=cbDTzLY1PzW3fVwU2EMiTB1Nymq9wCi+BAGlkyyGZhUSaYwAyDQuYtyPnemeQbz6g5 iN8p40/izVWEngKzh+h0m92mGJDhbrFgKAeLNdjAqkzXAPHkTzJk4I136lqxoS6JHrnV uAzRvN1Ujv4SxQaA60YX+tD2P4S1qBxRJ4OTqqQo+KXOQQa9tNN0iPrgiQXt3bIyUfd2 YSveIyP6AG47pXDmboAHtqRTN52U05BgTEGCEwQx6onkXTdDJvHQm6mRirQ3ez5iBaej +Efdc70HiY2OTFXrQtawwIk7j6fnzvuZTQrxZsRv7WgQ0AX8FPthyJLXsWWGpCF5jcki VybA== 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=wVDcnmo85JOb/Wc3AoxiDTuKIhlC43tBAXn1wDhKCaY=; b=RFCMkHM2arLzTLnxJ7KTDbPQqX/CkeFvqOr0HPRV+Y5pgdW1bElFYIo6CjWe9fQ1AD YMd7OIy7muH7rPLD9uyJGW2QuBT2hxeUuypm+6UcM5FR4WbvwFSUvMwiorRCT27MVhCn zB2jqK/jomBdDSP5/r+5mpRJDyIsVqqiAnMdn/35WtOZ6fDblgEnQNCXZktF64OULr99 EAhbYbB13GeryZqVsctIwvdI1jbbRW8I2Gw0BFg+9srOsOp17gWcMzmiez4G0Fikb2ki 1C9vpRkwnejeOhjQp3qwqhMq+SoD4lw4qI+gru8LL74vVjYcEfUowkzsTBounmfRmIzk 3PYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=vgBsGsEu; 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 k5-20020a170902e90500b0016d22e2a9e9si19166254pld.349.2022.08.11.06.24.37; Thu, 11 Aug 2022 06:24:51 -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=vgBsGsEu; 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 S235531AbiHKNNs (ORCPT + 99 others); Thu, 11 Aug 2022 09:13:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235044AbiHKNNq (ORCPT ); Thu, 11 Aug 2022 09:13:46 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50B9073300 for ; Thu, 11 Aug 2022 06:13:42 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20220811131335euoutp01fd529e67be5b1fc31d7ca5ae5beeff9e~KTJUd4tHG0372503725euoutp01L for ; Thu, 11 Aug 2022 13:13:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20220811131335euoutp01fd529e67be5b1fc31d7ca5ae5beeff9e~KTJUd4tHG0372503725euoutp01L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1660223616; bh=wVDcnmo85JOb/Wc3AoxiDTuKIhlC43tBAXn1wDhKCaY=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=vgBsGsEu4Un7u+QLyMfg/KBYT3OjKzD0fKTIWaJ6pEXPI8AYmDF1unMvIFh0dONW0 AQSv/5Cs53vhpHKUbzA138vJf5lN5bTl5XUEGsiG26MILwb7c8Qm0hthJVyIiyDHe1 JtkbITsxRX8FYutshQAbAMexNWVEWoEhX+PjYWWU= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220811131335eucas1p242dba0f0e0c88975262e8c23b160356f~KTJUFxrcB2271122711eucas1p2u; Thu, 11 Aug 2022 13:13:35 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C7.B0.10067.F7005F26; Thu, 11 Aug 2022 14:13:35 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220811131335eucas1p25e679d6235436c7c5667ae643564b30f~KTJTkZ9os3176231762eucas1p2a; Thu, 11 Aug 2022 13:13:35 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220811131334eusmtrp2a1e02cccf7cfd18e8e53d72ffda981c4~KTJTjbneG2687626876eusmtrp2E; Thu, 11 Aug 2022 13:13:34 +0000 (GMT) X-AuditID: cbfec7f4-dd7ff70000002753-45-62f5007f1b69 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B0.83.09095.E7005F26; Thu, 11 Aug 2022 14:13:34 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220811131334eusmtip239fdf39b6646965cc9b55507ec32d343~KTJTXGUVV0541005410eusmtip2L; Thu, 11 Aug 2022 13:13:34 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.43) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Aug 2022 14:13:32 +0100 Message-ID: <5512a55d-8852-db6d-6a54-9b8bb3cf2e96@samsung.com> Date: Thu, 11 Aug 2022 15:13:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v9 03/13] block: allow blk-zoned devices to have non-power-of-2 zone size Content-Language: en-US To: Damien Le Moal , , , , , CC: , , , , , , , , , , Luis Chamberlain From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.43] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGKsWRmVeSWpSXmKPExsWy7djPc7r1DF+TDOZtlbNYf+oYs8Xqu/1s FtM+/GS2+H32PLPF3nezWS32LJrEZLFy9VEmiyfrZzFb/O26x2Sx95a2xeVdc9gs5i97ym4x oe0rs8WNCU8ZLdbcfMpiceKWtIOAx+Ur3h47Z91l97h8ttRj06pONo/NS+o9dt9sYPPY2Xqf 1eP9vqtAodPV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y3vdRatE238zKzfTSXz7tdTo9F 6rR/MiixFGckGmoxFxUnAgCWd3/orQMAAA== X-CMS-MailID: 20220811131335eucas1p25e679d6235436c7c5667ae643564b30f X-Msg-Generator: CA X-RootMTR: 20220803094805eucas1p1c68ba40d319331c2c34059f966ba2d83 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220803094805eucas1p1c68ba40d319331c2c34059f966ba2d83 References: <20220803094801.177490-1-p.raghav@samsung.com> <20220803094801.177490-4-p.raghav@samsung.com> X-Spam-Status: No, score=-7.7 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=ham 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 >> static inline bool disk_zone_is_seq(struct gendisk *disk, sector_t sector) >> { >> if (!blk_queue_is_zoned(disk->queue)) >> @@ -753,6 +777,12 @@ static inline unsigned int disk_zone_no(struct gendisk *disk, sector_t sector) >> { >> return 0; >> } >> + >> +static inline bool bdev_is_zone_start(struct block_device *bdev, sector_t sec) >> +{ >> + return false; >> +} > > Is this one really necessary ? Any caller of this would also depend on > CONFIG_BLK_DEV_ZONED and not compiled if not enabled. So there should be no > callers of this for the !CONFIG_BLK_DEV_ZONED case. > We are using it in dm-table.c in device_area_is_invalid() function. So it can be called without being compiled with CONFIG_BLK_DEV_ZONED like bdev_is_zoned() in dm-table.c. >> + >> static inline unsigned int bdev_max_open_zones(struct block_device *bdev) >> { >> return 0; > >