xref: /dragonfly/tools/regression/nfsmmap/README (revision 86d7f5d3)
1*86d7f5d3SJohn Marino$DragonFly: src/tools/regression/nfsmmap/README,v 1.2 2008/07/09 18:15:10 thomas Exp $
2*86d7f5d3SJohn Marino
3*86d7f5d3SJohn MarinoThese tests are intended to make sure that NFS's use of the
4*86d7f5d3SJohn Marinob_{valid,dirty}{off,end} fields of struct buf is consistent with the
5*86d7f5d3SJohn MarinoVM system's use of the underlying VM pages.
6*86d7f5d3SJohn Marino
7*86d7f5d3SJohn MarinoTest1:
8*86d7f5d3SJohn Marino	Open the file and write into the file, creating a buf
9*86d7f5d3SJohn Marino	with a valid range and a dirty range
10*86d7f5d3SJohn Marino
11*86d7f5d3SJohn Marino	Fsync, flushing the dirty range
12*86d7f5d3SJohn Marino
13*86d7f5d3SJohn Marino	Mmap and read the whole page.  Since only part of the page is
14*86d7f5d3SJohn Marino	valid, the VM system must re-read the invalid parts of the
15*86d7f5d3SJohn Marino	page.
16*86d7f5d3SJohn Marino
17*86d7f5d3SJohn MarinoTest2:
18*86d7f5d3SJohn Marino	This is the same as test1 without the fsync.  The VM system
19*86d7f5d3SJohn Marino	should first write out the dirty range and then read the rest
20*86d7f5d3SJohn Marino	of the page.  This is currently broken since the vnode_pager
21*86d7f5d3SJohn Marino	doesn't use the original buf for its i/o and therefore the
22*86d7f5d3SJohn Marino	information in b_dirtyoff, b_dirtyend is not available.
23