Page MenuHomeFreeBSD

nfsclient: handle page and buffer cache consistency()
ClosedPublic

Authored by kib on Dec 30 2023, 7:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 7:58 PM
Unknown Object (File)
Sun, Nov 17, 7:45 AM
Unknown Object (File)
Thu, Nov 14, 5:38 AM
Unknown Object (File)
Mon, Nov 11, 10:21 AM
Unknown Object (File)
Sat, Nov 9, 8:57 PM
Unknown Object (File)
Sat, Nov 9, 2:49 PM
Unknown Object (File)
Jan 18 2024, 3:16 PM
Unknown Object (File)
Jan 5 2024, 11:44 AM
Subscribers

Details

Summary
nfsclient: flush dirty pages of the vnode

before ncl_flush() when done to ensure that the server sees our cached
data.

Convert LK_SHARED invp lock into LK_EXCLUSIVE if needed to call
vm_object_page_clean().

Otherwise server-side copy makes the client cache inconsistent with the
server data.
nfsclient copy_file_range(): flush dst vnode data

Otherwise server-side copy makes the client cache inconsistent with the
server data.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Dec 30 2023, 7:03 PM

This is the same as the 2nd patch you posted to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276002, right? That one does not fix the test case.

This is the same as the 2nd patch you posted to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276002, right? That one does not fix the test case.

Right, this is exactly the same patch. It is still required, despite there is something more than just copy_file_range() cache bugs.

Two more places where we need to launder pages in the cache.

kib retitled this revision from nfsclient: handle page and buffer cache consistency for copy_file_range() to nfsclient: handle page and buffer cache consistency().Dec 31 2023, 5:29 AM
kib edited the summary of this revision. (Show Details)

This looks fine to me. I did a little testing and did not
find any regression.

This revision is now accepted and ready to land.Dec 31 2023, 5:00 PM