Subject: Re: ubc and nfs file truncation
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 08/08/2004 14:16:36
hi,

On Sun, Aug 08, 2004 at 06:57:34PM +0900, YAMAMOTO Takashi wrote:
> > the solution I'd prefer is that ubc_fault() be changed to not need to
> > know the object's size.  this would allow us to use the UBC interfaces
> > for non-vnode objects as well, which is desirable for its own sake.
> > I was just talking with someone else on what was needed for this,
> > give me a few days and I'll see what I can come up with.
> > 
> > -Chuck
> 
> what's going on this since then?
> 
> YAMAMOTO Takashi


the diff I've been working with is at
	ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/diff.ubc-novp

the gist of the change is that instead of limiting the getpages request
to the vnode's size, we ask for however many pages are left in the
mapping window.  however, genfs_getpages() trims the request to the
vnode's size (rounded to the fs block size) anyway, so the result
should be the same.  testing hasn't revealed any problems so far.

does this solve the problem that you were looking at as well?

-Chuck