From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbXFTU4U (ORCPT ); Wed, 20 Jun 2007 16:56:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750939AbXFTU4J (ORCPT ); Wed, 20 Jun 2007 16:56:09 -0400 Received: from mail.clusterfs.com ([206.168.112.78]:42177 "EHLO mail.clusterfs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbXFTU4G (ORCPT ); Wed, 20 Jun 2007 16:56:06 -0400 Date: Wed, 20 Jun 2007 14:56:02 -0600 From: Andreas Dilger To: clameter@sgi.com 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 , linux-ext4@vger.kernel.org Subject: Re: [36/37] Large blocksize support for ext2 Message-ID: <20070620205602.GI5181@schatzie.adilger.int> Mail-Followup-To: clameter@sgi.com, 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 , linux-ext4@vger.kernel.org References: <20070620182907.506775016@sgi.com> <20070620183014.438784820@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070620183014.438784820@sgi.com> 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 Jun 20, 2007 11:29 -0700, clameter@sgi.com wrote: > This adds support for a block size of up to 64k on any platform. > It enables the mounting filesystems that have a larger blocksize > than the page size. Might have been good to CC the ext2/3/4 maintainers here? I definitely have been waiting for a patch like this for ages (so definitely no objection from me), but there are a few caveats before this will work on ext2/3/4. > Hmmm... Actually there is nothing additional to be done after the earlier > cleanup of the macros. So just modify copyright. It is NOT possible to have 64kB blocksize on ext2/3/4 without some small changes to the directory handling code. The reason is that an empty 64kB directory block would have a rec_len == (__u16)2^16 == 0, and this would cause an error to be hit in the filesystem. What is needed is to put 2 empty records in such a directory, or to special-case an impossible value like rec_len = 0xffff to handle this. There was a patch to fix the 64kB blocksize directory problem, but it hasn't been merged anywhere yet seeing as there wasn't previously a patch to allow larger blocksize... Having 32kB blocksize has no problems that I'm aware of. Also, I'm not sure how it happened, but ext2 SHOULD have an explicit check (as ext3/4 does) limiting it to EXT2_MAX_BLOCK_SIZE. Otherwise it appears that there would be no error reported if the superblock reports e.g. 16MB blocksize, and all kinds of things would break. There shouldn't be a problem with increasing EXT{2,3,4}_MAX_BLOCK_SIZE to 32kB (AFAIK), but I haven't looked into this in a while. Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.