Re: Should block-number-in-file vars be using blkcnt_t?

Mingming Cao <[email protected]> Tue, 22 Aug 2006 10:49:44 -0700
Newsgroups gmane.comp.file-systems.ext2.devel
Organization IBM LTC
Message-ID <[email protected]>
On Tue, 2006-08-22 at 11:16 -0500, Eric Sandeen wrote:
> Takashi Sato wrote:
> 
> >> Can anyone summarize the status of the various patchsets which have been
> >> submitted for 2^32-1 -block filesystems?  What can I do to help get this
> >> finished up and committed?
> 
> > AFAIK, the status is as follows.
> > - Basically, >8TB filesystem became available with Mingming's patches(*1)
> >  which add ext3_fsblk_t and ext3_grpblk_t on 2.6.18-rc1.
> >  However, the overflow problems on full 2^32-1 blocks filesystem
> >  remained.  (Eric caught these bugs.)
> 
> Looking over Takashi's patches, I think that this is all that remains to fix up the
> 32-bit containers in kernelspace.  If this patch (based on Takashi's patches)
> looks acceptable, I'll submit it upstream.
> 
> Index: linux-2.6.17/fs/ext3/ialloc.c
> ===================================================================
> --- linux-2.6.17.orig/fs/ext3/ialloc.c
> +++ linux-2.6.17/fs/ext3/ialloc.c
> @@ -202,7 +202,7 @@ error_return:
>  static int find_group_dir(struct super_block *sb, struct inode *parent)
>  {
>  	int ngroups = EXT3_SB(sb)->s_groups_count;
> -	int freei, avefreei;
> +	unsigned long freei, avefreei;
>  	struct ext3_group_desc *desc, *best_desc = NULL;
>  	struct buffer_head *bh;
>  	int group, best_group = -1;
> @@ -261,10 +261,10 @@ static int find_group_orlov(struct super
>  	struct ext3_super_block *es = sbi->s_es;
>  	int ngroups = sbi->s_groups_count;
>  	int inodes_per_group = EXT3_INODES_PER_GROUP(sb);
> -	int freei, avefreei;
> +	unsigned long freei, avefreei;
>  	ext3_fsblk_t freeb, avefreeb;
>  	ext3_fsblk_t blocks_per_dir;
> -	int ndirs;
> +	unsigned long ndirs;
>  	int max_debt, max_dirs, min_inodes;
>  	ext3_grpblk_t min_blocks;
>  	int group = -1, i;


These three: freei, avefreei(number of inodes) and ndirs (number of
directories) are not related to 16TB ext3 fixes, IMHO.

Do we want to mix the type fixes for inodes/directories with the 32bit
ext3 block type fix here? I suspect we might need more work to increase
the #of inodes per filesystem.

Others looks okay to me.

Thanks,

Mingming


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642