Subject: Re: Overlapping bread(9) behaviour
To: None <rumble@ephemeral.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 07/03/2007 12:36:46
On Tue, Jul 03, 2007 at 11:55:17AM -0400, Stephen M. Rumble wrote:
> Quoting Thor Lancelot Simon <tls@rek.tjls.com>:
> 
> "As expected" is my interpretation of what bread(9) says. It makes no  
> mention that what I was previously attempting to do is invalid. The  
> system also makes no attempt to assert that it's being used properly  
> in this regard. I think that a note in the manual and an assertion  
> would be appropriate.

I agree.  The manual should also note that the "buffer cache" is now
really merely the "metadata cache".  I try to use that terminology but
it's a chore to be consistent about it.

When file data could be in the buffer cache, there wasn't consistency
with mmap().  But, to address your other point that I've snipped, you
should note that we do not have a fixed-size buffer cache any longer --
the buffers are allocated on demand.

> EFS does not use the buffer cache for VREG. It does, however, for VDIR  
> and VLNK. I think this is appropriate. Kindly correct me if I'm wrong.

I agree.  Though if EFS uses variable-size extents for directories, you're
going to have to split them into fixed-size buffers or, possibly, bite the
bullet and arrange to keep directories in the page cache (this has been
hacked on a few times but nobody's got an implementation that works).  One
thing that may help is that we now have a "nested buffer" abstraction due
to Reinoud's UDF work, which may make it much, much easier to scatter and
gather variable size I/Os to/from fixed-size buffers without the kind of
evil we used before -- I think there's a nestiobuf(9) manual page.

As I recall, SGI's EFS had 32-bit (maybe signed 32-bit?) size limitations,
which were "addressed" by replacing it with XFS.  I'm curious -- were you
planning to extend EFS for larger disks?  In a lot of ways it would be a
nice clean replacement for FFS.

-- 
Thor Lancelot Simon	                               tls@rek.tjls.com
  "All of my opinions are consistent, but I cannot present them all
   at once."	-Jean-Jacques Rousseau, On The Social Contract