files > 2GB

Stephen C. Tweedie sct en redhat.com
Jue Ene 27 20:03:53 CST 2000


Hi,

On Tue, 25 Jan 2000 15:58:25 +0300 (MSK), "Khimenko Victor"
<khim en sch57.msk.ru> said:

>> You can only open files >= 2GB if you pass the O_LARGEFILE flag
>> to open(2). Otherwise open() will simply fail. As legacy apps do
>> not set O_LARGEFILE, there is no problem.

> Are you sure ??? File can grow while it's opened :-)

The LFS standard already deals with this.  The kernel is required to
maintain the "offset maximum" for each fd, and files opened with 32-bit
off_t have an offset maximum of 2G.  Any attempt to write beyond that
point will fail with EFBIG.  Files opened with open64 or with
-D_LARGEFILE64_SOURCE in effect will not have that limit.

--Stephen

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



Más información sobre la lista de distribución Ayuda