Subject: Re: removing VOPs
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: tech-kern
Date: 10/20/2005 12:41:29
On Thu, Oct 20, 2005 at 07:27:52PM +0900, YAMAMOTO Takashi wrote:
> > - What is unsafe with VOP_BALLOC? A file system supporting files with holes
> >   should export a VOP to allocate these blocks.
> 
> lack of locking.

Caller of fss_bmap (the function doing the VOP_BALLOC) locks the vnode.

> i agree about the necessity of the API.
> however, the current form of VOP_BALLOC (and VOP_BMAP) is not
> usable for the code outside of the filesystem itsself.

Any ideas about the new API?
To my knowledge it would be used by fss(4), vnd(4) and swap.
Fss(4) and vnd(4) will run it from a kernel thread. I don't know if swapping
may run it from an interrupt context.

> > - Shall I change the userland (fssconfig(8) and dump(8)) on branch 'yamt-vop'
> >   to make fss work again?
> 
> how the userland is related?

dump/snapshot.c and fssconfig/fssconfig.c create a backing store and truncate
it to the needed size. Without VOP_BALLOC support the backing store must be
written up to the needed size.

> (the branch currently covers only src/sys/.)
> 
> YAMAMOTO Takashi

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)