HomeFreeBSD

nfsclient: flush dirty pages of the vnode

Description

nfsclient: flush dirty pages of the vnode

before ncl_flush() when done to ensure that the server sees our cached
data, because it potentially changes the server response. This is
relevant for copy_file_range(), seek(), and allocate().

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

Reported by: asomers
PR: 276002
Noted and reviewed by: rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43250

Details

Provenance
kibAuthored on Dec 30 2023, 12:15 AM
Differential Revision
D43250: nfsclient: handle page and buffer cache consistency()
Parents
rG7dae1467d72a: nfsclient copy_file_range(): flush dst vnode data
Branches
Unknown
Tags
Unknown