HomeFreeBSD

libzfs: Fix mounting datasets under thread limit pressure

Description

libzfs: Fix mounting datasets under thread limit pressure

During parallel zpool import, /sbin/zpool will create a separate thread
pool for each pool, used to mount that pool's datasets. If the total
thread count exceed's the system's limit on threads per process, then
tpool_dispatch may fail. If it does, directly execute the mount
operation instead.

Sponsored by: Axcient
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Wilson <gwilson@delphix.com>
Signed-off-by: Alan Somers <asomers@FreeBSD.org>
Closes #16178
Fixes #16172

Details

Provenance
asomersAuthored on May 7 2024, 8:21 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 14 2024, 4:36 PM
Parents
rGf625d038d2ae: tpool_dispatch: fail if it cannot start at least 1 worker.
Branches
Unknown
Tags
Unknown