Subject: ubc block allocation on write(2) (was: Re: kern/25279: NFS read
To: None <chuq@chuq.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 07/09/2005 18:12:24
hi,

> > > I meant that it makes a bit more sense for ufs_balloc_range() to call
> > > VOP_GETPAGES() with VM_PROT_WRITE instead of VM_PROT_READ.
> > 
> > do you mean, letting VOP_GETPAGES allocate blocks rather than doing it in
> > ufs_balloc_range?
> 
> no, though the change I was talking about would have had that unintended
> side-effect.  I'll drop this idea for now.

btw, when filling holes, i think that
sys_write -> ... -> ubc_fault -> VOP_GETPAGES(.. VM_PROT_WRITE ..)
ends up to allocate more blocks than ufs_balloc_range does, if
page size is larger than block size.
is this intended behaviour?

if it isn't, i guess the easiest fix would be
an explicit PGO_NOBLOCKALLOC in ubc_fault.

YAMAMOTO Takashi