mirror_zfs/lib/libzfs
Serapheim Dimitropoulos 43a8536260 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-07-18 13:02:33 -07:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Fix changelist mounted-dataset iteration 2018-10-10 21:13:13 -07:00
libzfs_config.c OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a" 2017-02-03 13:24:44 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_crypto.c Allow unencrypted children of encrypted datasets 2019-06-20 12:29:51 -07:00
libzfs_dataset.c OpenZFS 9318 - vol_volsize_to_reservation does not account for raidz skip blocks 2019-07-05 15:35:15 -07:00
libzfs_diff.c Fix wrong assertion in libzfs diff error handling 2019-05-19 17:31:54 -07:00
libzfs_import.c Improve zpool labelclear 2019-03-21 10:13:01 -07:00
libzfs_iter.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
libzfs_mount.c Fix race in parallel mount's thread dispatching algorithm 2019-07-09 09:31:46 -07:00
libzfs_pool.c Remove dedupditto functionality 2019-06-19 14:54:02 -07:00
libzfs_sendrecv.c zfs send does not handle invalid input gracefully 2019-07-08 15:10:23 -07:00
libzfs_status.c Add missing MMP status code to libzfs_status 2019-01-03 12:15:46 -08:00
libzfs_util.c Race condition between spa async threads and export 2019-07-18 13:02:33 -07:00
libzfs.pc.in Add libnvpair to libzfs pkg-config 2019-06-22 16:43:11 -07:00
Makefile.am Include third party licenses in dist tarballs 2019-01-08 09:29:34 -08:00
THIRDPARTYLICENSE.openssl Encryption patch follow-up 2017-10-11 16:54:48 -04:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00