file too large

Simon Marlow simonmar@microsoft.com
Fri, 9 May 2003 15:45:23 +0100


=20
> On Fri, May 09, 2003 at 02:43:58PM +0100, Alastair Reid wrote:
> > man 2 open describes O_LARGEFILE as follows:
> > O_LARGEFILE: On 32-bit systems that support the Large Files=20
> System, allow=20
> > files whose sizes cannot be  represented in 31 bits to be opened.
> > I'm slightly puzzled about why you would need to specify=20
> this flag. That is,=20
> > why would it not just go ahead and open the file anyway?
> > My best guess is that you are promising that all indexes=20
> into the file will be=20
> > 64 bit (unsigned?) ints and not a 32 bit unsigned int.  In=20
> other words, it's=20
> > a backward compatability feature with a little typechecking=20
> thrown in.
>=20
> SuSv3 doesn't specify a difference between RW and RO. My=20
> first guess is
> unexpected nontermination could occur if something loops until getting
> some kind of sign it's passed EOF since offsets would wrap so they
> wanted to avoid that compatibility issue.
>=20
> Anyway, will the following kernel update help clarify things?=20
> I'll send
> it in to akpm et al if so. I've checked with a couple of people and it
> appears the code is what was intended, not the comment.

A man page update might be nice too.  I checked 'man open' on Linux and
it says nothing about EFBIG, although it does mention O_LARGEFILE.

Cheers,
	Simon