Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2023 21:48:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 273962] copy_file_range does not work on shared memory objects
Message-ID:  <bug-273962-9-upK9KWQNeT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273962-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273962-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273962

--- Comment #7 from Rick Macklem <rmacklem@FreeBSD.org> ---
Now that I have taken a quick look, doing
the shared memory fallback will be quite a
bit of work, given the range locking stuff.
Something like:
- Define a new f_op (f_copy_file_range()).
- Factor most of the contents of kern_copy_file_range()
  out into a vn_fileop_copy_file_range().
- Call the new f_op from kern_copy_file_range()
- Write a shm_copy_file_range() f_op that is similar
  to the vnode one, but uses the shmfd stuff for
  rangelocking and then does the copying (via memcpy()
  in some sort of loop or maybe uiomove() needs to be used?).
  - I am not sure what this last step requires.

Not that big a deal, but not that easy.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273962-9-upK9KWQNeT>