[Bug 276002] nfscl: data corruption using both copy_file_range and mmap'd I/O

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 01 Jan 2024 22:21:24 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276002

--- Comment #37 from Rick Macklem <rmacklem@FreeBSD.org> ---
Going back to my example case (which sounds like what
net-p2p/rtorrent might be doing), it is possible for
the NFS client VOP_READ() to do a
    vm_object_page_clean()
which should ensure that mmap(2)'d writing (as in
modifying bytes within mmapped address space) is
written to the server.

This would not handle the case where mmap(2)'d
writing is intermixed with read(2)s.

Does that sound worth doing?

And, is it likely that vm_object_mightbedirty()
will return true when this is not needed?
(If this is the case, a flag on the vnode that
 indicates it has been mmap(2)'d would be helpful.)

-- 
You are receiving this mail because:
You are the assignee for the bug.