Subject: Re: kern/15232: ffs_sync writes out read-only pages to disk
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 01/13/2002 11:16:25
dbj@netbsd.org wrote:
> 
> >Number:         15232
> >Category:       kern
> >Synopsis:       ffs_sync writes out read-only pages to disk

> 
>         I spent some time trying to figure out why my ibook's disk
> would not spin down when idle after I had been using the system for a
> while.  Eventually, I discovered that our ffs_sync routine flushes out
> a vnode if vp->v_uobj.uo_pages is non-zero.  Since this is true when
> an executable is mapped read-only, i found that my executables and
> shared libraries were constantly being written out to disk.

Am I being naive?

Surely there is a 'page modified' bit  - and the write should only
happen
if it is modified?

There should probably be a check at this level against writing back
modified pages that were mapper readonly as well.

	David