xfs
[Top] [All Lists]

Re: mmap() Limitation

To: "Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx>
Subject: Re: mmap() Limitation
From: Steve Lord <lord@xxxxxxx>
Date: 05 Dec 2001 13:19:35 -0600
Cc: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: <ACD4093EB009D411BC8A009027D7699660A15E@mail.tapeware.com>
References: <ACD4093EB009D411BC8A009027D7699660A15E@mail.tapeware.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
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


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