HomeFreeBSD

Add support for parallel pool exports

Description

Add support for parallel pool exports

Changed spa_export_common() such that it no longer holds the
spa_namespace_lock for the entire duration and instead sets
spa_export_thread to indicate an import is in progress on the
spa. This allows for an export to a diffent pool to proceed
in parallel while an export is still processing potentially
long operations like spa_unload_log_sm_flush_all().

Calls like spa_lookup() and spa_vdev_enter() that rely on
the spa_namespace_lock to serialize them against a concurrent
export, now wait for any in-progress export thread to complete
before proceeding.

The 'zpool import -a' sub-command also provides multi-threaded
support, using a thread pool to submit the exports in parallel.

Sponsored-By: Klara Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Wilson <gwilson@delphix.com>
Signed-off-by: Don Brady <don.brady@klarasystems.com>
Closes #16153

Details

Provenance
Don Brady <don.brady@klarasystems.com>Authored on May 2 2024, 7:28 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 14 2024, 3:57 PM
Parents
rGabec7dcd30ac: Linux: disable lockdep for a couple of locks
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG975a13259b87: Add support for parallel pool exports (authored by Don Brady <don.brady@klarasystems.com>).May 14 2024, 3:57 PM