From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 163BDC433E0 for ; Mon, 18 Jan 2021 18:14:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA50E221EB for ; Mon, 18 Jan 2021 18:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436621AbhARSOd (ORCPT ); Mon, 18 Jan 2021 13:14:33 -0500 Received: from verein.lst.de ([213.95.11.211]:49110 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407353AbhARSOY (ORCPT ); Mon, 18 Jan 2021 13:14:24 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id C5DBE6736F; Mon, 18 Jan 2021 19:13:38 +0100 (CET) Date: Mon, 18 Jan 2021 19:13:38 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-block@vger.kernel.org, 'Jens Axboe ' , Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] block: Add bio_limit Message-ID: <20210118181338.GA11002@lst.de> References: <20210114194706.1905866-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210114194706.1905866-1-willy@infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jan 14, 2021 at 07:47:06PM +0000, Matthew Wilcox (Oracle) wrote: > It's often inconvenient to use BIO_MAX_PAGES due to min() requiring the > sign to be the same. Introduce bio_limit() and change BIO_MAX_PAGES to > be unsigned to make it easier for the users. > > Signed-off-by: Matthew Wilcox (Oracle) I like the helper, but I'm not too happy with the naming. Why not something like bio_guess_nr_segs() or similar?