Re: LFS Support for Sendfile

Matti Aarnio
2002-02-28T08:06:47Z

On Wed, Feb 27, 2002 at 08:22:10PM -0500, Doug McNaught wrote:
> "Doug O'Neil" <DougO@seven-systems.com> writes:
> > Hello group.
> >
> > First time poster. If this isn't the right place for this then please point
> > me in the right direction and accept my apology.
> >
> > I'm using Linux 2.4.12 on a PIII
>
> That's pretty darn old. Can you try it with a modern kernel (2.4.18)?

Won't help.

The API (kernel syscall) as defined does not support LFS.

mm/filemap.c:
asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t *offset,
size_t count)

The problem there is that "off_t *" thing. A loff_t in that spot would
solve the problem, but that needs rewriting the thing with a new syscall
number. Trivial in itself, though. (And changeing the count to 64-bit
value is equally trivial at the same time.)

There lurks another problem in the filesystems, though.

All SysV UFS tradition type filesystems with indirect indexing of
disk blocks will need more and more of metadata traversal to reach
actual data blocks on very large files. It slows things down.

The "extent based" filesystems offer flatter performance, and while
I can't determine if ReiserFS is exactly of that type, it too offers
fast and flat performance.

> -Doug

/Matti Aarnio