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)
Mon, Apr 7, 9:08 AM
Unknown Object (File)
Mar 5 2025, 8:24 PM
Unknown Object (File)
Mar 4 2025, 3:21 AM
Unknown Object (File)
Feb 8 2025, 3:01 AM
Unknown Object (File)
Jan 27 2025, 4:58 PM
Unknown Object (File)
Jan 25 2025, 9:26 AM
Unknown Object (File)
Jan 24 2025, 5:59 PM
Unknown Object (File)
Jan 20 2025, 11:04 AM
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