Subject: Re: removing VOPs
To: Jason Thorpe <>
From: Chuck Silvers <>
List: tech-kern
Date: 10/21/2005 06:22:06
On Thu, Oct 20, 2005 at 06:17:53PM +0200, Juergen Hannken-Illjes wrote:
> On Thu, Oct 20, 2005 at 08:48:54AM -0700, Jason Thorpe wrote:
> > 
> > On Oct 20, 2005, at 4:18 AM, YAMAMOTO Takashi wrote:
> > 
> > >i guess that an alternative would be just making fss do VOP_WRITE
> > >when it needs to allocate blocks.
> > 
> > Doesn't that have the unfortunate side-effect of polluting the page  
> > cache with extra copies of the data?
> Yes, therefore I used VOP_BMAP/VOP_BALLOC for fss(4).
> Would it be ok to use
>     ubc_alloc(&vp->v_uobj, ..)
>     uiomove()
>     ubc_release(.., UBC_UNMAP)
> or
>     vn_rdwr()

please use this latter one, it's a higher level interface.
you can replace the loops in fss_write_cluster() and fss_bs_io()
with one call to this, and eliminate fss_bmap() entirely.

the main reason that I haven't checked in the directio code yet is that
I wanted to also put in changes to allow concurrent writes (as long as
they are non-overlapping and non-allocating), but that's harder.
however, in this application you're already serializing everything
so it's not really a problem that directio would be doing it too.
I'll update my directio tree to current top-of-tree this weekend
and see what else still needs to be done there.  as I recall,
it was pretty close to done other than the concurrency issue.