Subject: Re: New patch (Re: RFC: addition of B_NESTED to buf.h and vfs_bio.c)
To: None <reinoud@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/08/2006 11:35:00
> > i don't understand what exactly you want to achieve.  can you explain?
> > to me, it seems that you are going to increase the sizeof(struct buf)
> > without any benefits.
> 
> The main benefit to nesting is that an action on an (io)buf can be split up 
> into several independently sheduled actions on the nested buf's like 
> genfs's getpages/putpages do whatever the reason is. Genfs only uses a 
> hardcoded mechanism to skip over dirty pages and the nested buffer 
> implementation is a generalisation of this mechanism.

to me, it seems reverse.
your proposed patch changes how to implement nested buffers,
from B_CALL and b_private (generic way) to
a special-purpose hook and members (less generic way).

> By implementing it this way this splitting up is streamlined and reusable 
> and provides another set of b_private, b_bp, b_call and other 
> flags/values/callbacks that can be reused by the code that decided to split 
> up the buffer.

do you mean, you want to use the "another set of flags/values/callbacks"
for your filesystem?  for what?

YAMAMOTO Takashi