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