CNFS and Linux 2.4

Miquel van Smoorenburg list-inn-workers at news.cistron.nl
Fri Nov 9 09:45:15 UTC 2001


In article <20011109014724.C7104 at wonderland.linux.it>,
Marco d'Itri <md at Linux.IT> wrote:
>
>On Nov 08, bill davidsen <davidsen at tmr.com> wrote:
>
> >2.4, compile INN with large file support. I have the feeling you can use
> >a partition as a cycbuff in 2.4, but I can't remember any details. I
>I asked Andrea Arcangeli about this some months ago. At early 2.4 time,
>support for mmapping raw file partitions larger than 2 GB was not in the
>standard kernels and one of his patches was needed. I don't know if it
>has been merged since.

Not quite correct. In early 2.4 kernels, you couldn't mmap()
block devices at all. Since 2.4.10 or so, you can, since blockdevices
are now accessed through the page cache instead of the buffer cache.
I've tested this with a simple mmap() test program.

As Linux 2.4 also has large files support, it should be possible to
run CNFS directly on block devices. Perhaps a few things need to be
tuned in the INN source, but I haven't tried it myself yet. Is there
anyone who has built INN on Linux with largefile support anyway ?

A few more things:

1. The -ac kernels do not have the "blockdev in pagecache" functionality
   so run mainline 2.4.14 or up
2. You need glibc 2.2 for large file support
3. "raw devices" generally mean something else than blockdevices;
   the term is usually used for a special blockdevice that when read
   or written to doesn't go through the buffer or page cache but talks
   directly to the disk. Under most Unices this is done by opening
   a character device rather than a block device. Under Linux you have
   special raw devices that you can bind to a certain block device.
   In the Andrea (-aa) kernels you can simply open the block device,
   or indeed any file, with O_DIRECT to get this behaviour. In time
   this will probably be ported to mainline 2.4 kernels

Mike.
-- 
"Only two things are infinite, the universe and human stupidity,
 and I'm not sure about the former" -- Albert Einstein.

-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to miquels at cistron-office.nl (Miquel van Smoorenburg)


More information about the inn-workers mailing list