mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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
This commit is contained in:
committed by
Brian Behlendorf
parent
abec7dcd30
commit
975a13259b
+2
-2
@@ -8143,11 +8143,11 @@ l2arc_dev_get_next(void)
|
||||
|
||||
ASSERT3P(next, !=, NULL);
|
||||
} while (vdev_is_dead(next->l2ad_vdev) || next->l2ad_rebuild ||
|
||||
next->l2ad_trim_all);
|
||||
next->l2ad_trim_all || next->l2ad_spa->spa_is_exporting);
|
||||
|
||||
/* if we were unable to find any usable vdevs, return NULL */
|
||||
if (vdev_is_dead(next->l2ad_vdev) || next->l2ad_rebuild ||
|
||||
next->l2ad_trim_all)
|
||||
next->l2ad_trim_all || next->l2ad_spa->spa_is_exporting)
|
||||
next = NULL;
|
||||
|
||||
l2arc_dev_last = next;
|
||||
|
||||
Reference in New Issue
Block a user