File Size question

Phillip Mikulak (pmikulak@iusb.edu)
Mon, 23 Nov 1998 15:29:35 -0500 (EST)


Hello. My name is Phil Mikulak and I work for Indiana University. We have
been using debian linux on dell PC's with great success for over a year
now. However, I have run into a problem that I could use some advice on.

I would like to use a file on an ext2 file system that is approximately
1.5 gigabytes in size (the file has daily stock return data dating back to
the early 60's. This file is used by several of our faculty for research
purposes). However, the largest size file I can create is 1073741824
bytes. I have explored the kernel source files and have found 2 source
files where a "file too big" message can crop up: file.c and inode.c under
/usr/src/linux/fs/ext2. After some experimenting I found that code within
the inode.c was limiting the size a file could be. When I bypassed this
code, I was able to make a 1.5 gig. file.

Needless to say, I have a feeling this is a dangerous thing to do. My
question is, is there any way around the 1.07 gigabyte limitation? Any
advice someone might have would be greatly appreciated.

Here's the exact code within inode.c that gives the file-too-big error
when attempting to create a new file bigger than 1.07 gig:

if (!create || new_block >=
(current->rlim[RLIMIT_FSIZE].rlim_cur >>
EXT2_BLOCK_SIZE_BITS(inode->i_sb))) {
brelse (bh);
*err = -EFBIG;
return NULL;
}

This code is in the function block_getblk

Thanks again.

Phil Mikulak
Indiana University South Bend

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/