From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933456AbXGXIvV (ORCPT ); Tue, 24 Jul 2007 04:51:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758812AbXGXIvD (ORCPT ); Tue, 24 Jul 2007 04:51:03 -0400 Received: from mail.clusterfs.com ([74.0.229.162]:43113 "EHLO mail.clusterfs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758465AbXGXIu7 (ORCPT ); Tue, 24 Jul 2007 04:50:59 -0400 Date: Tue, 24 Jul 2007 02:50:56 -0600 From: Andreas Dilger To: Andrew Morton Cc: Fengguang Wu , Nick Piggin , Rusty Russell , Dave Jones , Peter Zijlstra , linux-kernel , riel , Tim Pepper , Chris Snook , Jens Axboe , linux-ext4@vger.kernel.org, Mingming Cao , Bjorn Helgaas , Chris Ahna , David Mosberger-Tang , Kyle McMartin , Dave Jones , Dave Airlie Subject: Re: [PATCH 0/3] readahead drop behind and size adjustment Message-ID: <20070724085056.GE5992@schatzie.adilger.int> Mail-Followup-To: Andrew Morton , Fengguang Wu , Nick Piggin , Rusty Russell , Dave Jones , Peter Zijlstra , linux-kernel , riel , Tim Pepper , Chris Snook , Jens Axboe , linux-ext4@vger.kernel.org, Mingming Cao , Bjorn Helgaas , Chris Ahna , David Mosberger-Tang , Kyle McMartin , Dave Jones , Dave Airlie References: <20070721210005.000228000@chello.nl> <20070722023923.GA6438@mail.ustc.edu.cn> <20070722024428.GA724@redhat.com> <20070722081010.GA6317@mail.ustc.edu.cn> <1185093236.6344.87.camel@localhost.localdomain> <46A46E4B.7050007@yahoo.com.au> <385201377.00678@ustc.edu.cn> <20070723124009.5fcf4fef.akpm@linux-foundation.org> <385238729.01475@ustc.edu.cn> <20070723181701.c5551449.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070723181701.c5551449.akpm@linux-foundation.org> User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/0D35BED6 X-GPG-Fingerprint: 7A37 5D79 BF1B CECA D44F 8A29 A488 39F5 0D35 BED6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Jul 23, 2007 18:17 -0700, Andrew Morton wrote: > hm, yes, there is a risk that the code was accidentally correct. Or the > code has only ever dealt with power-of-2 inputs, in which case it happens > to work either way. > > David(s) and ext4-people: could we please have a close review of these > changes? > > @@ -1706,8 +1704,8 @@ static int ext4_fill_super (struct super > > - sbi->s_addr_per_block_bits = log2(EXT4_ADDR_PER_BLOCK(sb)); > > - sbi->s_desc_per_block_bits = log2(EXT4_DESC_PER_BLOCK(sb)); > > + sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); > > + sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); For the ext[234] code there has only ever been power-of-two values for ADDR_PER_BLOCK() and DESC_PER_BLOCK(). Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.