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)
Sun, Nov 3, 1:28 AM
Unknown Object (File)
Oct 1 2024, 4:24 AM
Unknown Object (File)
Oct 1 2024, 4:21 AM
Unknown Object (File)
Oct 1 2024, 1:47 AM
Unknown Object (File)
Sep 27 2024, 2:00 PM
Unknown Object (File)
Sep 17 2024, 10:35 AM
Unknown Object (File)
Sep 16 2024, 9:16 PM
Unknown Object (File)
Sep 16 2024, 6:29 PM
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