Skip to contentSkip to conversation

Breaking Ext3/VFS file size limit

DISCUSSION Goldwyn Rodrigues 2 participants 2 messages Jun 9, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I am building a custom kernel which could break the max file size limit from 2TB. I found the dependancy on number of 512-byte blocks, as i_blocks.

i_blocks is a 32 bit unsigned long in structures struct inode and struct ext3_inode. I changed it to unsigned long long in struct inode (in fs.h) and used a reserved field in ext3_inode to carry the higher order bits.

Also changed a checking function which returns the maximun possible size as 2TB.

My question is:
Would changing the data type of i_blocks in struct inode (in fs.h) result in any breakdowns. It could happen if the inode structure is directly mapped to some other structure.

I tested at my end with a low end PC and it seems to work fine, for the past 6 hours.

Thanks,

Signature · 3 lines
Goldwyn :o)

PS: I am posting for the first time, so please forgive me (but do tell me, personally if possible) if I commit a mistake.
#1 lore raw
Quoted 6 lines · Goldwyn Rodrigues

I am building a custom kernel which could break the max file size limit from 2TB. I found the dependancy on number of 512-byte blocks, as i_blocks.

i_blocks is a 32 bit unsigned long in structures struct inode and struct ext3_inode. I changed it to unsigned long long in struct inode (in fs.h) and used a reserved field in ext3_inode to carry the higher order bits.

Just FYI, this should all be made conditional upon CONFIG_LBD so that the majority of users who don't have/need such large files do not consume excess space in their inodes.

Quoted 2 lines

Also changed a checking function which returns the maximun possible size as 2TB.

Again FYI, the next limit for ext3 is 4TB for 4kB block size when you run out of space for indirect blocks.

Quoted 4 lines

My question is:
Would changing the data type of i_blocks in struct inode (in fs.h) result in any breakdowns. It could happen if the inode structure is directly mapped to some other structure.

If you don't also fix the stat code you won't be able to stat such files.

Quoted 2 lines

PS: I am posting for the first time, so please forgive me (but do tell me, personally if possible) if I commit a mistake.

It is usually good to include a patch with any discussion (diff -up format).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/