From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: [31/37] Large blocksize support: Core piece Date: Wed, 20 Jun 2007 22:26:27 -0700 (PDT) Message-ID: References: <20070620182907.506775016@sgi.com> <20070620183013.224208780@sgi.com> <20070621002013.GC10927@localhost> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Mel Gorman , William Lee Irwin III , David Chinner , Jens Axboe , Badari Pulavarty , Maxim Levitsky To: Bob Picco Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:58693 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751463AbXFUF0a (ORCPT ); Thu, 21 Jun 2007 01:26:30 -0400 In-Reply-To: <20070621002013.GC10927@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 20 Jun 2007, Bob Picco wrote: > > + if (size > (PAGE_SIZE << MAX_ORDER) || size < 512 || > > + !is_power_of_2(size)) > I think this should be: > if (size > (MAX_ORDER_NR_PAGES << PAGE_SHIFT) ... > or > if (size > (PAGE_SIZE << (MAX_ORDER - 1)) ... > bob > > return -EINVAL; Right.... MAX_ORDER is the first illegal order not the last usable.