Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091279rwb; Mon, 15 Aug 2022 17:54:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hrpg/yLHozDa7Hb+9KLQqYLYklOfjJVsB6Hj+NQ6o1lNVqUtMUCMvinjw+dTemjMSFLtP X-Received: by 2002:a17:907:a218:b0:731:5e2c:c28a with SMTP id qp24-20020a170907a21800b007315e2cc28amr11898098ejc.472.1660611296649; Mon, 15 Aug 2022 17:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611296; cv=none; d=google.com; s=arc-20160816; b=GH7zIgOX5rxs9j11E4sWUloVbe+3EvGKyTYVHDsmBW9bK5sG/beC6jA4Qkntzxbzo3 JUCle68gL0OLX2sErGECjjLjZ5sfw/3RRW1FFHHLye5TnPS1hL9J+S1KmZRuBMrOCybf xfprdIl/QrWIIEuqU2KCdl2xoc+KBXzxlv8ZBU2eT78lZG/dnSI0impvme5GtGvSGsHT fUITL5Cq0HoZPOFFhq+QtmyLxDibwH1gfXO7NTK8NLZA+vzjj8cJH2Z2X1chh68nFn5l cUc5Qs0kOnonK2V3xAOViKGGIHj9H9UTpOB8xji8CJ4hp4ecXPMW/AMgoj1Oe1eI9uVo p0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ikIZR8S2gChZ49lHJHQuxmNsKWaHfuwxl99ldaVmML4=; b=a8V2KgBIykVPXMvWs22CtAgRgOcAmlzPmEBnrDpAbcykx4MjXcVSU4lmMGNQvRAtoT AR/AWPY+Vb0BpHNBVS3JYQkyzvTK7bJA5JgX1WuacJoi2AoUSzF69SjNFBTjJEmGHsV9 odyLjgSEfD4XyHSYrkZvF47g8Ik21khYtXiBR0ILnsiCiKGzzKCnvoXz8Yv5EIaC+oS7 S7ZeOaRpFtplpmphKNs3ouVgDwSbReLefRZiDUwBBMuWGmGPWRNykwW+YitY7qs2+ymI As5lBL59gPJU9GI7Dlc0cCAtP0+TBTMJgJWOFqbpt9f7FQIYLMe4VIGpvJjoVQ98n2dw drXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OngrY+iY; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga14-20020a1709070c0e00b007317e0f2b71si9881127ejc.256.2022.08.15.17.54.31; Mon, 15 Aug 2022 17:54:56 -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=@linuxfoundation.org header.s=korg header.b=OngrY+iY; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245336AbiHOXZl (ORCPT + 99 others); Mon, 15 Aug 2022 19:25:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345768AbiHOXVH (ORCPT ); Mon, 15 Aug 2022 19:21:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C675D7D790; Mon, 15 Aug 2022 13:04:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 79153B80EAD; Mon, 15 Aug 2022 20:04:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D17B1C433C1; Mon, 15 Aug 2022 20:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593868; bh=RhcSSngBtNJqlypII+iNFiSmycad2c4LfRwUEb29heI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OngrY+iYwanTr5cQLbCGZNvXM1+zZWU0nandkupwb8Lxf6nGcF7/SNx4nBwU75967 nMoTd8CmXaLewa8DtGdnAcs/3x7o61Ohe9hAZE9D//ax1ZRNLuR5bQ4CbvXTCefwXX Wym1r4ilTx6/x0O3rDkEX2Ldr0tlK+ywSvZvGihY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Thumshirn , Jens Axboe , Christoph Hellwig , Naohiro Aota , David Sterba , Sasha Levin Subject: [PATCH 5.18 1018/1095] block: add bdev_max_segments() helper Date: Mon, 15 Aug 2022 20:06:57 +0200 Message-Id: <20220815180511.200844214@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, SPF_HELO_NONE,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 From: Naohiro Aota [ Upstream commit 65ea1b66482f415d51cd46515b02477257330339 ] Add bdev_max_segments() like other queue parameters. Reviewed-by: Johannes Thumshirn Reviewed-by: Jens Axboe Reviewed-by: Christoph Hellwig Signed-off-by: Naohiro Aota Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- include/linux/blkdev.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 34f2b88dfd6e..7927480b9cf7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1196,6 +1196,11 @@ bdev_max_zone_append_sectors(struct block_device *bdev) return queue_max_zone_append_sectors(bdev_get_queue(bdev)); } +static inline unsigned int bdev_max_segments(struct block_device *bdev) +{ + return queue_max_segments(bdev_get_queue(bdev)); +} + static inline unsigned queue_logical_block_size(const struct request_queue *q) { int retval = 512; -- 2.35.1