Subject: Re: nfs vs pagedaemon
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 05/03/2003 10:40:45
On Thu, May 01, 2003 at 11:27:02PM +0900, YAMAMOTO Takashi wrote:
> > > > the change you checked in isn't quite correct, though.
> > > > if someone does a physio write (via vnd) to an NFS file from a mapping of
> > > > the same file at a different offset, you'd set PG_NEEDCOMMMIT on the
> > > > pages from the mapping instead of the pages for the range being modified
> > > > (which might not even exist on the client).
> > > 
> > > i see.  so, adding check of pg->offset is enough?
> > 
> > it looks like that would take care of it, yea.
> > (and on second thought, physio would take a different path and avoid
> > any problem here, but writes via a vnd block device would still need this.)
> 
> physio via /dev/drum has the same problem, hasn't it?

I'll take your word for it.  :-)


> > it would be easier to tell that the nfs_strategy() code is correct if it were
> > told more explicitly when it's ok to use the commit mechanism, though.
> 
> do you think that B_PAGEIO can be useful for something other than nfs?
> if not, isn't it better to push such knowledges into nfs itsself?

I haven't thought of any other use for such a flag yet.
it's hard to keep such a flag entirely inside nfs, though,
since the strategy interface (ie. struct buf) is widely used.
this new flag would be less nfs-specific than B_NEEDCOMMIT was, at least.

-Chuck