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 764F8C43334 for ; Mon, 4 Jul 2022 08:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231409AbiGDIXq (ORCPT ); Mon, 4 Jul 2022 04:23:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiGDIXp (ORCPT ); Mon, 4 Jul 2022 04:23:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1025762E2 for ; Mon, 4 Jul 2022 01:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tqtH+tKbGqUtXf7ZcU473v5xPBvRZWZX+ympKxzAl30=; b=gTjyJZjhiAy3u7j1jlvbeMcQFf z4FBEGwiWM4BHKczdnLarVUBPZjLZNPlNMQFOouxODWR7HoXgY5qhIjKWa6rZA5a0CpA5Yq6Dx/F7 bhAQriXOE9/5oSUFXKQ5VW0wlTHe+mCJ4ea7FJWdojCVqJOd14ayEw99DKF3B3tC8mZFQ+He448s6 HVFAOEFbpBOz30vw6qytUcWPB+aUynNMXkBJ9Vf90yk+Cxe/CXf9t+qOCLfEAIetY1tgrnvF+uNPv 9sIeNOgJN0LbFDCYZuOUArwMNZNpL8LMlN8WmIsIEtSPkEJ5U+/DvDdLFh1ufW5nszpcSqaeIuk0d xGay8ptQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8HMu-00637Z-K0; Mon, 04 Jul 2022 08:23:44 +0000 Date: Mon, 4 Jul 2022 01:23:44 -0700 From: Christoph Hellwig To: Naohiro Aota Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH 01/13] block: add bdev_max_segments() helper Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Please Cc the block list. On Mon, Jul 04, 2022 at 01:58:05PM +0900, Naohiro Aota wrote: > Add bdev_max_segments() like other queue parameters. > > Signed-off-by: Naohiro Aota > --- > 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 > ---end quoted text---