Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3124825rwb; Mon, 15 Aug 2022 18:44:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4wDCA504TGU96idXRjLphSFffep5Mf+MA306FuJE6PgYnBIPZAGJUdIq5m84SW+Gu3b6mk X-Received: by 2002:a05:6402:400b:b0:43d:b0a1:dee with SMTP id d11-20020a056402400b00b0043db0a10deemr16983958eda.223.1660614291480; Mon, 15 Aug 2022 18:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660614291; cv=none; d=google.com; s=arc-20160816; b=f6gxqwLxr5eLUF8QmO0fe8H+DPaSLPYb7MKqpv50sTzrcOC6G1bmoGosYx80r6N61b twNNtBUnS1xE9DvUCAhhhj+06PLA+5YpOoBhxuZZ4uhflVa1NNEtCjmpEXLhWX3x1VKU pDBlokM783xdosQFsLbnerObBS/YhUWTKGvkfQ0NU0tSl570149dePEkfdlkxPlnCSoU UzjqELnOsT0oDg0kbry2b4MK0QUOo7wM8mQj9Ci71/0B1/L42ZgpkathhvVBhRAgyNwo 8LFCoIbCgVjnaqskL7X8elo5utxXHCC5NSmhpd19CdQFh/LVlKphGHJpqSGKaSsqod06 6zHQ== 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=0ahHcvi3a23IxWo3pdeKAvFJW9gxP9HnJ8GSLcPtvic=; b=P4ym9yj97n9QBabPqTV+xqMffrTHLt9y/A8cbURKfmxhUvnnPx4qVME3pOKvZi+QQt zbanMLL9OoE3I3yAqo+hAWeDJhFJ2S+D5gmzLKCXSAP6YVp/3MrXFf5G8IGPqyQk/A62 YKCtVX5RtQ1WYJAOZGF0jppgcUzd6R+/kivTXIeItx9l4nZHPIzP3+Khm1exJqg2vNNG vmQjboF9cPQXZ4wKE59+qkhqgkuBQDVLocHUuXr+SpODb1VIDJtRlyWlvIUYoW8D7eK3 VNjeshGineZbqLl6TamMARk6AAeX7/aDVgQdan0qF/ED5KVY851XBGzE0mpjpHCBpQkl zVdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nZfHlNi3; 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 z8-20020a05640235c800b004379c601345si9970238edc.569.2022.08.15.18.44.26; Mon, 15 Aug 2022 18:44: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=@linuxfoundation.org header.s=korg header.b=nZfHlNi3; 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 S1344573AbiHPBEM (ORCPT + 99 others); Mon, 15 Aug 2022 21:04:12 -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-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 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 *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