xfs
[Top] [All Lists]

Re: encounter a 4 GB file size limit

To: Todd Raeker <raeker@xxxxxxxxx>
Subject: Re: encounter a 4 GB file size limit
From: Jonathan Dill <dill@xxxxxxxxxxxx>
Date: Mon, 29 Oct 2001 12:13:21 -0500
Cc: linux-xfs@xxxxxxxxxxx
Organization: CARB
References: <01102909435902.11332@chemraeker1>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Todd,

I ran into a filesize limitation with RH 7.1 tcsh that was not compiled
with O_LARGEFILE enabled.  I recompiled tcsh and that solved the
problem.  You can use this test that was sent by Nathan Scott to check
if it's a limitation of your shell:

# Example of tcsh with filesize limitation:
# strace /bin/tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3

# Example of tcsh compiled with O_LARGFILE
# strace /bin/tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3

A similar test should work for other shells as well.

To fix the problem, I installed tcsh-6.10-6.src.rpm with "rpm -ivh" (I
used the src.rpm from RH 7.2, but the src.rpm from RH 7.1. should work
too).  I extracted the tcsh-6.10.tar.gz archive, editted the Makefile.in
and editted the CFLAGS line as follows:

CFLAGS = @CFLAGS@ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64

Then I tarred up the tcsh back to tcsh-6.10.tar.gz and ran "rpm -bb
SPEC/tcsh.spec" to generate a new i386.rpm.  I'm sure there is a more
elegant way to make this change, eg. a patch applied through the .spec
file.

-- 
"Jonathan F. Dill" (dill@xxxxxxxxxxxx)
CARB IT Coordinator
Experimental Support Site http://concept.umbi.umd.edu


<Prev in Thread] Current Thread [Next in Thread>