Re: 2G file size limitation question

Peeter Joot (peeter@joot.com)
Wed, 7 Jan 1998 01:03:38 -0500 (EST)


>as far as i can tell, the ext2 filesystem code limits files to a maximum
>of 2G (although i haven't yet found _exactly_ where this limit is set...).
>
>we have a need to use files larger than 2G (ugh, dont ask - we also need
>to bump our machine up from 512M to 1G or more of memory...), so i have a
>couple of questions:
>
> - why is there a 2G limit?
> - can the 2G limit be _safely_ increased (to, say, about 5G)?
> - if so, what changes are needed in the ext2 code to do it?

I think that the 2G limit is because a 32 bit value is currently used
to store file offsets and that 2G-1 is as big as one can go before the
offset has a negative value.

In order to support a 5G file, the file system and the kernel would have
to internally use >32 bit file offsets, and the 64 bit file io operations
(stat64, open64, ...) would have to be implemented.

I think I heard that somebody was working on 64 bit file op code but I
may be mistaken.

Peeter

-- 
Peeter Joot
http://www.accessv.com/~peeter                               peeter@accessv.com