Subject: Re: loaning for read() of regular files
To: Chuck Silvers <chuq@chuq.com>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 02/16/2005 09:05:55
On Feb 16, 2005, at 6:57 AM, Chuck Silvers wrote:
> /* This provides functionality somewhat similar to mmap() but using
> read().
> * It gives sliding window access to a file. mmap() is not used
> because of
> * the possibility of another program (such as a mailer) truncating the
> * file thus giving us a SIGBUS. */
>
> so they were just being a bit lazy.
Not only are they lazy, on NetBSD that simply isn't true. I wrote a
test case for this after discussing it with Luke Mewburn, who in turn
had discussed this very issue with the rsync/samba guys. As far as I
can tell, they're working around a bug in Linux.
-- thorpej