HomeFreeBSD

libzfs: zpool_load_compat(): open feature file cloexec

Description

libzfs: zpool_load_compat(): open feature file cloexec

As a bonus, this also passes the open flags into the open flags instead
of the mode (it worked by accident because O_RDONLY is 0),
correctly detects a failed map,
and prefaults the entire file since we're always writing to every page

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11993

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on Apr 29 2021, 8:21 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 10 2021, 7:21 PM
Parents
rG74256266ff1e: copy-builtin: posix conformance
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG133fd00930ed: libzfs: zpool_load_compat(): open feature file cloexec (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).May 10 2021, 7:21 PM