Subject: Re: RFC: addition of B_MANAGED and 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/04/2006 07:28:53
> B_EXTERN? why named extern? FreeBSD uses the term B_MANAGED too for this
> kind of buffers and since its a `managed' buffer by some other party and
> not a part of the normal queues. The name B_EXTERN doesn't ring a bell with
> me really.

i don't think freebsd's B_MANAGED is such a thing.
afaik, it's something like B_LOCKED.

> Say a filingsystem has a malloc'd space in wich it keeps for example a FAT 
> or some other filing system structure. The only thing to write it out in 
> one go is then:
> 
> 	buf = getmanagedbuf(xxx->yyyloc, structp, structlen);
> 	buf->b_flags |= B_WRITE;
> 	VOP_STRATEGY(vp, buf)
> 	brelse(buf);

struct buf is used for two different purposes.  ie. buffer cache and i/o.
i guess that you are mixing them.

YAMAMOTO Takashi