During pool export flush the ARC asynchronously
commit44446dccdb0077bcf9d93db2fe336ccefc04635e
authorDon Brady <don.brady@klarasystems.com>
Thu, 5 Dec 2024 16:58:20 +0000 (5 09:58 -0700)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2024 16:58:20 +0000 (5 08:58 -0800)
tree7fdbecd1e8f888e6066bd46e320b6a3ef1404830
parent2507db612df9e888fb9939eec41b48d59ca1c3cb
During pool export flush the ARC asynchronously

This also includes removing L2 vdevs asynchronously.

This commit also guarantees that spa_load_guid is unique.

The zpool reguid feature introduced the spa_load_guid, which is a
transient value used for runtime identification purposes in the ARC.
This value is not the same as the spa's persistent pool guid.

However, the value is seeded from spa_generate_load_guid() which
does not check for uniqueness against the spa_load_guid from other
pools.  Although extremely rare, you can end up with two different
pools sharing the same spa_load_guid value! So we guarantee that
the value is always unique and additionally not still in use by an
async arc flush task.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Don Brady <don.brady@klarasystems.com>
Closes #16215
include/sys/arc.h
include/sys/arc_impl.h
include/sys/spa.h
module/zfs/arc.c
module/zfs/dsl_pool.c
module/zfs/spa_misc.c
module/zfs/vdev.c