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, Jan 4, 2:19 AM
Unknown Object (File)
Dec 14 2025, 11:21 PM
Unknown Object (File)
Dec 11 2025, 4:39 AM
Unknown Object (File)
Dec 6 2025, 1:20 PM
Unknown Object (File)
Nov 26 2025, 12:00 AM
Unknown Object (File)
Nov 24 2025, 11:40 PM
Unknown Object (File)
Nov 23 2025, 10:04 PM
Unknown Object (File)
Nov 19 2025, 10:56 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