2 Gb File Size Limit ?

Kevin Krieser kkrieser at lcisp.com
Sat Nov 15 01:30:53 UTC 2003


The issue is that, for years, the basic APIs for fileaccess was based on a
signed long int for file offset, limiting files to 2GB.  When 40MB, or even
400MB hard drives were common, this wasn't a big issue.  When 4GB hard
drives, and larger, started to become prevalent, workarounds had to be
devised.  Less efficient, since 64bit values aren't a basic type.  Also,
programs had to be reviewed and revised to ensure that file offsets weren't
being done in 32 bit integers.

Of course, for many programs, it was just a special recompile against a new
glibc.  For instance, if all you do is read sequentially, there probably
isn't a problem.

-----Original Message-----
From: fedora-list-admin at redhat.com
[mailto:fedora-list-admin at redhat.com]On Behalf Of Michael Schwendt
Sent: Friday, November 14, 2003 5:02 PM
To: fedora-list at redhat.com
Subject: Re: 2 Gb File Size Limit ?


On Thu, 13 Nov 2003 18:37:16 -0700, Shashi Bhusan Patra wrote:

> Kevin Krieser wrote:
>
> >But do you have any files over 4 GB?
> >
> >
> oh you mean any file whose size is 4GB+ ?? NO, certainly not. that is
> not directly possible on a 32 bit system.

That's a wrong assumption. 32-bit CPU registers do not imply that you
could not implement 64-bit (or larger) file seek pointers. The limitation
is the file-system implementation. See bottom of the following page about
an overview of current Linux filesystems:
http://www.suse.de/~aj/linux_lfs.html

--





More information about the fedora-list mailing list