From patchwork Tue Jan 10 14:36:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 13095226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCCC1C46467 for ; Tue, 10 Jan 2023 14:36:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232301AbjAJOgq (ORCPT ); Tue, 10 Jan 2023 09:36:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238476AbjAJOgp (ORCPT ); Tue, 10 Jan 2023 09:36:45 -0500 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774F243A02 for ; Tue, 10 Jan 2023 06:36:42 -0800 (PST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230110143638euoutp0128f1580ee964284609d768bd35b8fd5f~4_VODHzbu3100431004euoutp01P for ; Tue, 10 Jan 2023 14:36:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230110143638euoutp0128f1580ee964284609d768bd35b8fd5f~4_VODHzbu3100431004euoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1673361398; bh=R4b4EPkdRWUUjgqA7T04PUXUczW2+piir3kCLNH8c6w=; h=From:To:Cc:Subject:Date:References:From; b=vj9fHhNZyJGNuQw+SlxiTejcDpA3plVlo/tCNMZSEHuJtq21sIEoCpn3Wi1kJ/RQh 9oZn17SaUWZO9rtKBg0ohxPvslJaSqlIe0oXxGwnrOgeSfNoW3/Z5E+LEzPGEgEE74 B6lrPhl/OukQ8bOHzq3vLkf4UnP+rIHunu7k68bs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230110143637eucas1p28f0c3737e9bc89cacc4efde5292e2a39~4_VNLQdE00230702307eucas1p2h; Tue, 10 Jan 2023 14:36:37 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 06.A6.56180.5F77DB36; Tue, 10 Jan 2023 14:36:37 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230110143637eucas1p1d82528b632ccda1de4fb2795ff691fe2~4_VMxKnHZ1940819408eucas1p1L; Tue, 10 Jan 2023 14:36:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230110143637eusmtrp1254629674830a830237a3444e6bec537~4_VMwfUdt2765827658eusmtrp1M; Tue, 10 Jan 2023 14:36:37 +0000 (GMT) X-AuditID: cbfec7f2-ab5ff7000000db74-05-63bd77f55590 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 14.D0.52424.5F77DB36; Tue, 10 Jan 2023 14:36:37 +0000 (GMT) Received: from localhost (unknown [106.210.248.241]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230110143637eusmtip2e7b0ee7656712050d83a71862abedfa6~4_VMirkDu0980009800eusmtip2J; Tue, 10 Jan 2023 14:36:36 +0000 (GMT) From: Pankaj Raghav To: axboe@kernel.dk Cc: linux-nvme@lists.infradead.org, hch@lst.de, bvanassche@acm.org, linux-block@vger.kernel.org, damien.lemoal@opensource.wdc.com, gost.dev@samsung.com, snitzer@kernel.org, Pankaj Raghav Subject: [PATCH v2 0/3] block zoned cleanups Date: Tue, 10 Jan 2023 15:36:32 +0100 Message-Id: <20230110143635.77300-1-p.raghav@samsung.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWy7djP87pfy/cmGxxeomKx+m4/m8W0Dz+Z LX6fPc9scfPATiaLlauPMlnsvaVtMX/ZU3aLz0tb2C1O3JJ24PS4fMXb4/LZUo9NqzrZPDYv qffYfbOBzWNn631Wj74tqxg9Pm+SC+CI4rJJSc3JLEst0rdL4Mq4u+grS8F/jopz0xcwNzDO Ye9i5OSQEDCRaHmyCcjm4hASWMEo8fJJOxuE84VRYkX7dhYI5zOjxL0Vl9lgWm739DNDJJYz Sly/d5ARwnnJKPH0QjeQw8HBJqAl0dgJtkNEQFhif0cr2CRmgeuMEtOnXWYBSQgL6Ej86dgL NpVFQFXiQtt3RhCbV8BS4vaWXqht8hIzL31nh4gLSpyc+QSslxko3rx1NtgVEgJnOCT2Pupi hGhwkZj1sxHKFpZ4dXwL1KcyEqcn97BA2NUST2/8hmpuYZTo37meDeRqCQFrib4zOSAms4Cm xPpd+hBRR4n+u4oQJp/EjbeCEBfwSUzaNp0ZIswr0dEmBDFbSWLnzydQOyUkLjfNgdrpIbHz 4ESwp4QEYiVmP1jAOoFRYRaSv2Yh+WsWwgkLGJlXMYqnlhbnpqcWG+allusVJ+YWl+al6yXn 525iBCak0/+Of9rBOPfVR71DjEwcjIcYJTiYlUR4V3LuSRbiTUmsrEotyo8vKs1JLT7EKM3B oiTOO2Pr/GQhgfTEktTs1NSC1CKYLBMHp1QDk4DH0e7gu5eMZVr4zc5H7HNIituWUr9LUoq9 wSAsq13cySf7/tQ9B9cHcgaYP8zVdnsSOHPvwv9sX5xrrs9hEPA9msZfOv3EUg2p2InlPzeL TdS1nJScFKT8Q3KVw/GprMf+bN4dM8+2RWPbw71GVxp7bjmEbVHh5InZkvVdeX1kqPpjljWf Cg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KJL5k0X7Vo ZshfdZnHUkuU1+4p33XweJOO8GeZwE9ZO1nfRmhUzp8mEhkXcm13z7OXP/k0WWqjjm5r/JbZ UVvqxPdZ36E5PH9iUXflZ+Y5uVYOk0O0i7xO31S3s9nwS1bydsPyr/faDGuu2NwyPhKjvTpm gRJLcUaioRZzUXEiAA5hEkYlAwAA X-CMS-MailID: 20230110143637eucas1p1d82528b632ccda1de4fb2795ff691fe2 X-Msg-Generator: CA X-RootMTR: 20230110143637eucas1p1d82528b632ccda1de4fb2795ff691fe2 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230110143637eucas1p1d82528b632ccda1de4fb2795ff691fe2 References: Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi Jens, It is still unclear whether the support for non-po2 zone size devices will be added anytime soon [1]. I have extracted out the cleanup patches that doesn't do any functional change but improves the readability by adding helpers. This also helps a bit to maintain off-tree support as there is an interest to have this feature in some companies. [1] https://lore.kernel.org/lkml/20220923173618.6899-1-p.raghav@samsung.com/ Changes since v1: - Remove blk_is_zoned() check in bdev_{is_zone_start, offset_from_zone_start} (Damien) - Minor spelling and variable name changes (Bart and Johannes) - Remove zonefs patch for now (Damien) - Send dm patches separately(Christoph) Pankaj Raghav (3): block: remove superfluous check for request queue in bdev_is_zoned() block: add a new helper bdev_{is_zone_start, offset_from_zone_start} block: introduce bdev_zone_no helper block/blk-core.c | 2 +- block/blk-zoned.c | 4 ++-- drivers/nvme/target/zns.c | 3 +-- include/linux/blkdev.h | 22 +++++++++++++++++----- 4 files changed, 21 insertions(+), 10 deletions(-)