Subject: Re: that VM/fs cache coherency problem
To: Mike Hibler <firstname.lastname@example.org>
From: David Greenman <davidg@Root.COM>
Date: 08/02/1995 11:50:48
>So vi is using mmap? This is probably the same problem that David Greenman
>sent me mail about at one time. vnode_pager_setsize doesn't properly deal
>with files whose length is not a multiple of the page size (either shrinking
>or growing). I am guilty of not making the fix to 4.4. I resisted because
>this is just another band aide and it furthers the dangerous illusion that
>there is some sort of coherency between the VM and filesystem caches. It
>only fixes the case where there is a partial page at the end of a file.
This may need some small changes before it will drop into NetBSD. The
4.4-lite code doesn't have a "vm_pager_map_page", but does have a
"vm_pager_map_pages" routine that I think should work okay for this.
>However, this is arguably not a coherency issue since the file is not really
>changing, just growing. So it may be worth patching (you were right David!)