HomeFreeBSD

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

Description

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

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.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44756

Details

Provenance
desAuthored on Apr 12 2024, 5:30 PM
Reviewer
markj
Differential Revision
D44756: install: Don't skip syncing in the common case.
Parents
rG17dc7017d737: install: Simplify path construction.
Branches
Unknown
Tags
Unknown