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, Sep 27, 2:00 PM
Unknown Object (File)
Tue, Sep 17, 10:35 AM
Unknown Object (File)
Mon, Sep 16, 9:16 PM
Unknown Object (File)
Mon, Sep 16, 6:29 PM
Unknown Object (File)
Mon, Sep 16, 11:38 AM
Unknown Object (File)
Sun, Sep 8, 2:38 AM
Unknown Object (File)
Sun, Sep 1, 9:42 PM
Unknown Object (File)
Aug 20 2024, 2:00 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