Page MenuHomeFreeBSD

install: Don't skip syncing in the common case.
ClosedPublic

Authored by des on Apr 12 2024, 2:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 11:29 PM
Unknown Object (File)
Sun, May 17, 11:29 PM
Unknown Object (File)
Sun, May 17, 11:11 PM
Unknown Object (File)
Wed, May 6, 2:17 AM
Unknown Object (File)
Mon, May 4, 8:49 AM
Unknown Object (File)
Thu, Apr 30, 5:44 PM
Unknown Object (File)
Mon, Apr 27, 4:25 AM
Unknown Object (File)
Apr 19 2026, 8:48 PM
Subscribers

Details

Summary

In copy(), if no digest was requested (which is the common case), we
use copy_file_range() to avoid needlessly copying the contents of the
file into user space and back. When copy_file_range() returns
successfully (which, again, is the common case), we simply return, and
therefore never get to the point where we call fsync() if the -S
option was specified. Fix this.

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable