From nobody Mon Sep 29 21:09:37 2025 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 7E20DC25B0D for ; Tue, 16 Aug 2022 01:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344615AbiHPBEO (ORCPT ); Mon, 15 Aug 2022 21:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348822AbiHPA5v (ORCPT ); Mon, 15 Aug 2022 20:57:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252431A151B; Mon, 15 Aug 2022 13:49:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 31C426103F; Mon, 15 Aug 2022 20:49:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F7B7C433C1; Mon, 15 Aug 2022 20:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596556; bh=5XP+JktCdcOd3796REmaResK4m1N1n+ORXrfOpTHcCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nZfHlNi3gxWnq+8fzzm9YynEkbF1IWFW71bYMGZkQxyZFaeLQr4CJ4CPToXbk4OO/ dqvkB6Wi0xZRzW+pgK3hiy7Jba4zvZaVdnaH9+TsZEFLZQ6Adx9Xq+VXgM2DIpCay3 lx/ZpWsaqDr3nzKws57cBF6+z74Ap1I23F3jiFqM= 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.19 1084/1157] block: add bdev_max_segments() helper Date: Mon, 15 Aug 2022 20:07:20 +0200 Message-Id: <20220815180523.534315939@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 2f7b43444c5f..62e3ff52ab03 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1206,6 +1206,11 @@ bdev_max_zone_append_sectors(struct block_device *bd= ev) return queue_max_zone_append_sectors(bdev_get_queue(bdev)); } =20 +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 =3D 512; --=20 2.35.1