file too large

William Lee Irwin III wli@holomorphy.com
Fri, 9 May 2003 06:02:04 -0700


"Simon Marlow" <simonmar@microsoft.com> writes:
>> That's probably a bug, as long as the underlying OS uses 64-bit file
>> offsets.  How does the 2Gb limit manifest itself?

On Fri, May 09, 2003 at 12:05:19PM +0200, Ketil Z. Malde wrote:
> All standard Unix tools seem to work.  RedHat 8.0, GHC 5.04.2 from
> RPMs. 

/*
 * Called when an inode is about to be open.
 * We use this to disallow opening RW large files on 32bit systems if
 * the caller didn't specify O_LARGEFILE.  On 64bit systems we force
 * on this flag in sys_open.
 */
int generic_file_open(struct inode * inode, struct file * filp)
{
        if (!(filp->f_flags & O_LARGEFILE) && inode->i_size > MAX_NON_LFS)
                return -EFBIG;
        return 0;
}

i.e. the right open() etc. flags need to be passed.

What does strace(1) say it's doing?


-- wli