mirror_zfs/module
Serapheim Dimitropoulos 1c4b0fc745 Race condition between spa async threads and export
In the past we've seen multiple race conditions that have
to do with open-context threads async threads and concurrent
calls to spa_export()/spa_destroy() (including the one
referenced in issue #9015).

This patch ensures that only one thread can execute the
main body of spa_export_common() at a time, with subsequent
threads returning with a new error code created just for
this situation, eliminating this way any race condition
bugs introduced by concurrent calls to this function.

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #9015
Closes #9044
2019-09-25 11:27:50 -07:00
..
avl Update build system and packaging 2018-05-29 16:00:33 -07:00
icp Minor style cleanup 2019-09-25 11:27:49 -07:00
lua Update build system and packaging 2018-05-29 16:00:33 -07:00
nvpair Use NV_ENCODE_NATIVE for nvlist encoding variable 2019-04-26 11:24:31 -07:00
spl Retire unused spl_{mutex,rwlock}_{init_fini} 2019-09-25 11:27:49 -07:00
unicode Update build system and packaging 2018-05-29 16:00:33 -07:00
zcommon Minor style cleanup 2019-09-25 11:27:49 -07:00
zfs Race condition between spa async threads and export 2019-09-25 11:27:50 -07:00
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.in Fix out-of-tree build failures 2019-09-25 11:27:48 -07:00