On Wed, 2001-12-05 at 12:50, Quang Nguyen (Ngo) wrote:
> Let's say I want to write files to a tape device using:
>
> fd = open(file, O_RDONLY);
> addr = mmap(0, size, PROT_READ, MAP_PRIVATE, fd, 0);
> writeTape(addr, size);
> close(fd);
> munmap(addr, size);
> Is there a limit on how big the file be?
>
> Should I just use read() and write()? Isn't mmap() faster?
>
> There's a paper called "64 Bit File Access" from the XFS site that talks
> about mmap64(() and stat64(). Should I be using those 64-bit functions
> instead?
There does not appear to be a user space interface to mmap out beyond
a 4G boundary on ia32 linux. The mmap64 call is from irix. This looks
like a deficiency in the linux large file support to me.
Steve
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|