Re: [PATCH] fix ext3 mounts at 16T

Mingming Cao <[email protected]> Fri, 18 Aug 2006 10:33:36 -0700
Newsgroups gmane.comp.file-systems.ext2.devel,gmane.linux.kernel
Message-ID <[email protected]>
[email protected] wrote:

> I have reviewed your patch and found other place which might
> cause overflow as below.  If group_first_block is the first block of
> the last group, overflow will occur.  This has already been fixed
> in my patch.
> 
> o ext3_try_to_allocate_with_rsv() in fs/ext3/balloc.c
> 	if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb))
> 		    || (my_rsv->rsv_end < group_first_block))
> 			BUG();
> 

Yes, this isn't being addressed in the current 2.6.18-rc4 kernel. I 
think this is better than casting to unsigned long long:

- 	if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb))
+ 	if ((my_rsv->rsv_start > group_first_block - 1 + 
EXT3_BLOCKS_PER_GROUP(sb))


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