xref: /freebsd/tools/regression/nfsmmap/README (revision 05248206f720394d95c2a7475429311df670a2e9)
16527fda5SDoug RabsonThese tests are intended to make sure that NFS's use of the
26527fda5SDoug Rabsonb_{valid,dirty}{off,end} fields of struct buf is consistent with the
36527fda5SDoug RabsonVM system's use of the underlying VM pages.
46527fda5SDoug Rabson
56527fda5SDoug RabsonTest1:
66527fda5SDoug Rabson	Open the file and write into the file, creating a buf
76527fda5SDoug Rabson	with a valid range and a dirty range
86527fda5SDoug Rabson
96527fda5SDoug Rabson	Fsync, flushing the dirty range
106527fda5SDoug Rabson
116527fda5SDoug Rabson	Mmap and read the whole page.  Since only part of the page is
126527fda5SDoug Rabson	valid, the VM system must re-read the invalid parts of the
136527fda5SDoug Rabson	page.
146527fda5SDoug Rabson
156527fda5SDoug RabsonTest2:
166527fda5SDoug Rabson	This is the same as test1 without the fsync.  The VM system
176527fda5SDoug Rabson	should first write out the dirty range and then read the rest
186527fda5SDoug Rabson	of the page.  This is currently broken since the vnode_pager
196527fda5SDoug Rabson	doesn't use the original buf for its i/o and therefore the
20*8ce070c1SUlrich Spörlein	information in b_dirtyoff, b_dirtyend is not available.
21