Message ID | 20230106083317.93938-2-p.raghav@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp713416wrt; Fri, 6 Jan 2023 00:36:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvP4X9YrY0eDOs+8i1ZBKHcjfC9hS1uSSGscJqwI1ldiQuLygCWpQIF6YGKrHC5Wz00d6ro X-Received: by 2002:a17:906:6b97:b0:805:1e6e:6777 with SMTP id l23-20020a1709066b9700b008051e6e6777mr51229824ejr.23.1672994182999; Fri, 06 Jan 2023 00:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994182; cv=none; d=google.com; s=arc-20160816; b=xW68ESfxKMKEQfjgkR4DFilh+cJ+8rEFs82nFOE2BBvZXWVPTsbEVR57Adsu5agNjt RcfCn4ISThbhjiD5MOwYQcrm6WiapQeIdEOqQieB4hEULE1LCD6ETHaAyX8Luu78JoZc kmrkRWdCHH0c17oMoODhyKaBA5qXr7JXjcR4I347Mzz8wbpeV5Hu/dpGnZqhB0/yqJnS ZwzxA3v4Fvc4sJtUSVyxkZ65wtA1W/JjHq4JrxNKXqg0T0D+wdklV9c1FrG5gwXaFDv/ F72+tROAUi5LLRXBkXEV8s/FIV1TMtWUkvQXOvZNzN4UJ96+9Afjzs+w+tLr/NNHt1ot zAoA== 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 :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=xL98W+EK2xf54BjrEuaYdsMq2UetfroxJnaNHM1J0YQ=; b=XHFXL47t2dSw+ANRMxVKSQOCFXsaAQ1f9nS82MTsKE1PWjPuxTFYLE2zjlC6+X2xXX tU4aWYrcQmOarVKOnwElKJo8ffbWiek/6TG9vGQqEX2FFTAYzcOUtPT1wv0PYgTenrUx mySPWgE55TDNzEbslgpiTj2fr/UbLALK9ZxKNGDEp/qFArbWNHQ9+I1kaeMQTC6ECkYC 6K7Tza2NrO27SrjOFk28PdMYYKZrXppVbaGEY8+L4mvu+pU6rfCniEcLZ1XIEstDdM7k eNDGDPTFoeP6IivprgoE02c0+nuGSgFDS9gs96qJEVk+ZkxvYC3LiRoS9LNESkQNDjLD mhyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=F5Kt3ipm; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa3-20020a170906fd8300b007c0a81df4b6si696069ejb.707.2023.01.06.00.35.58; Fri, 06 Jan 2023 00:36:22 -0800 (PST) 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=F5Kt3ipm; 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 S232319AbjAFIdk (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Fri, 6 Jan 2023 03:33:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232396AbjAFId0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Jan 2023 03:33:26 -0500 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50A117A93A for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 00:33:23 -0800 (PST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230106083321euoutp013da2bde89e10e9fc4527f70e88156150~3qy4eLefG1654616546euoutp01k for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 08:33:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230106083321euoutp013da2bde89e10e9fc4527f70e88156150~3qy4eLefG1654616546euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1672994001; bh=xL98W+EK2xf54BjrEuaYdsMq2UetfroxJnaNHM1J0YQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F5Kt3ipmIqt9FPhQy71S0Xvmh86cC9Carqc/YhAA+WhVkmforjvQnKtdEXIrbVMrK IVlmC25Mcvdf09/FaahR5ulL8H1NPew4qWLZuMpX4lLZtV5EEQ33tYcKBtyVvGqlqc yu4TOC4G0GPHK3+4YgqYFlOl3vzR01T6/jKsVUsk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230106083319eucas1p2e3212c7c60824af430d2b887b4feb81a~3qy3WM79E3119231192eucas1p2D; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A7.14.61936.FCCD7B36; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230106083319eucas1p1e58f4ab0d3ff59a328a2da2922d76038~3qy28xCRM1636916369eucas1p1N; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230106083319eusmtrp2f28926097487b7893e7b9aeafb0edc06~3qy28ACgL0987109871eusmtrp2j; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) X-AuditID: cbfec7f4-a2dff7000002f1f0-d2-63b7dccfd9b7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FA.AB.52424.FCCD7B36; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) Received: from localhost (unknown [106.210.248.66]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230106083319eusmtip121f48b06b25f955e94de4a91b3bdc881~3qy2vWoUw0382103821eusmtip1Z; Fri, 6 Jan 2023 08:33:19 +0000 (GMT) From: Pankaj Raghav <p.raghav@samsung.com> To: axboe@kernel.dk Cc: kernel@pankajraghav.com, linux-kernel@vger.kernel.org, hare@suse.de, bvanassche@acm.org, snitzer@kernel.org, dm-devel@redhat.com, damien.lemoal@opensource.wdc.com, linux-nvme@lists.infradead.org, hch@lst.de, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav <p.raghav@samsung.com> Subject: [PATCH 1/7] block: remove superfluous check for request queue in bdev_is_zoned Date: Fri, 6 Jan 2023 09:33:11 +0100 Message-Id: <20230106083317.93938-2-p.raghav@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230106083317.93938-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMKsWRmVeSWpSXmKPExsWy7djPc7rn72xPNljxy9Bi9d1+NotpH34y W/w+e57ZYu+72awWNw/sZLLYs2gSk8XK1UeZLM68/MxisfeWtsXlXXPYLOYve8pu8XlpC7vF iVvSDrwel694e1w+W+qxaVUnm8fmJfUeu282sHnsbL3P6nF2paPH+31X2Tz6tqxi9Nh8utrj 8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8XK1UeZLM68/MxisfeWtsXlXXPYLOYve8pu8XlpC7vF iVvSDrwel694e1w+W+qxaVUnm8fmJfUeu282sHnsbL3P6nF2paPH+31X2Tz6tqxi9Nh8utrj 8ya5AO4oPZui/NKSVIWM/OISW6VoQwsjPUNLCz0jE0s9Q2PzWCsjUyV9O5uU1JzMstQifbsE vYw1PWdYC66zVfzsucXawHiJtYuRk0NCwETi/fKLjF2MXBxCAksZJba0NbJAJCQkbi9sYoSw hSX+XOtiA7GFBJ4xSnQeiOpi5OBgE9CSaOxkBwmLAJXs72hlAZnDLHCQSeLZlO/MIAlhgXCJ hVd3gNksAqoS39ZeAJvJK2ApMWdhOxPEfHmJmZe+gw3iFLCSeD59DRPELkuJjo+9bBD1ghIn Zz4Bu40ZqL5562zmCYwCs5CkZiFJLWBkWsUoklpanJueW2ykV5yYW1yal66XnJ+7iREYfduO /dyyg3Hlq496hxiZOBgPMUpwMCuJ8Jb1b0sW4k1JrKxKLcqPLyrNSS0+xGgKdPdEZinR5Hxg /OeVxBuaGZgamphZGphamhkrifN6FnQkCgmkJ5akZqemFqQWwfQxcXBKNTCVLtpSuLt2qeJv 1n99F8tFAiel2m576bV1UceCicoXVrC4h7g8XZQZtX/hpz0Ld3yQ43TaoPRpwsr3b1NPrxL1 0GgRvyPccchFTC7nvP/eT5fcy5vupicYT05dtflryHl/dYnvdQtUXhW0zy69aLHubM8H71r3 eNF/rlLONxuSM53F+ZY/iBGeduiF4SS729acSdKGVW7XGAOv3fn1J/LoF1WnZ9mn5J+3XGKp 6J2yYuNCrzdnzv77bbnig3F0KLtG05z9JaZHtLr7ytfd/fKmVfbnr+i3T7K1fj2sqnLyadUs Wp70KP3//S1fQlrP7zhw++dmg7MeqUc2PT4g/mlPV+D2QutZR1/HTFTP4Dz/XomlOCPRUIu5 qDgRANWNwXtHAwAA X-CMS-MailID: 20230106083319eucas1p1e58f4ab0d3ff59a328a2da2922d76038 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230106083319eucas1p1e58f4ab0d3ff59a328a2da2922d76038 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230106083319eucas1p1e58f4ab0d3ff59a328a2da2922d76038 References: <20230106083317.93938-1-p.raghav@samsung.com> <CGME20230106083319eucas1p1e58f4ab0d3ff59a328a2da2922d76038@eucas1p1.samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754261548522998032?= X-GMAIL-MSGID: =?utf-8?q?1754261548522998032?= |
Series |
block zoned cleanups
|
|
Commit Message
Pankaj Raghav
Jan. 6, 2023, 8:33 a.m. UTC
Remove the superfluous request queue check in bdev_is_zoned() as the
bdev_get_queue can never return NULL.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
include/linux/blkdev.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
Comments
On 1/6/23 17:33, Pankaj Raghav wrote: > Remove the superfluous request queue check in bdev_is_zoned() as the > bdev_get_queue can never return NULL. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- > include/linux/blkdev.h | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 43d4e073b111..0e40b014c40b 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -1283,12 +1283,7 @@ static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev) > > static inline bool bdev_is_zoned(struct block_device *bdev) > { > - struct request_queue *q = bdev_get_queue(bdev); > - > - if (q) > - return blk_queue_is_zoned(q); > - > - return false; > + return blk_queue_is_zoned(bdev_get_queue(bdev)); > } > > static inline bool bdev_op_is_zoned_write(struct block_device *bdev, Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
On 1/6/23 00:33, Pankaj Raghav wrote: > Remove the superfluous request queue check in bdev_is_zoned() as the > bdev_get_queue can never return NULL. the bdev_get_queue -> bdev_get_queue() Anyway: Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On 1/6/23 00:33, Pankaj Raghav wrote: > Remove the superfluous request queue check in bdev_is_zoned() as the > bdev_get_queue can never return NULL. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- Looks good. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
On 06.01.23 09:34, Pankaj Raghav wrote: > Remove the superfluous request queue check in bdev_is_zoned() as the minus the last 'the' Looks good, Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 43d4e073b111..0e40b014c40b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1283,12 +1283,7 @@ static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev) static inline bool bdev_is_zoned(struct block_device *bdev) { - struct request_queue *q = bdev_get_queue(bdev); - - if (q) - return blk_queue_is_zoned(q); - - return false; + return blk_queue_is_zoned(bdev_get_queue(bdev)); } static inline bool bdev_op_is_zoned_write(struct block_device *bdev,