From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTPS id 8B12A105643D for ; Tue, 29 Mar 2016 09:29:39 +0200 (CEST) Date: Tue, 29 Mar 2016 00:29:33 -0700 From: Christoph Hellwig To: Ming Lei Message-ID: <20160329072933.GF18920@infradead.org> References: <1458627149-12988-1-git-send-email-ming.lei@canonical.com> <1458627149-12988-6-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458627149-12988-6-git-send-email-ming.lei@canonical.com> Cc: Jens Axboe , Christoph Hellwig , Boaz Harrosh , Dave Chinner , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, linux-block@vger.kernel.org, Al Viro , Lars Ellenberg , Philipp Reisner , Anton Altaparmakov , drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH 5/8] fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > + nr_pages = BIO_MAX_PAGES; > if (nr_pages > total_nr_pages) > nr_pages = total_nr_pages; Looks reasonable, but the whole thing could simply become: nr_pages = min(total_nr_pages, BIO_MAX_PAGES);