Re: files > 2GB

From: Stephen C. Tweedie (sct@redhat.com)
Date: Thu Jan 27 2000 - 14:16:58 EST


Hi,

On Tue, 25 Jan 2000 15:58:25 +0300 (MSK), "Khimenko Victor"
<khim@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@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:19 EST