mirror_zfs/module
Pavel Zakharov a11c7aaec9 OpenZFS 9187 - racing condition between vdev label and spa_last_synced_txg in vdev_validate
ztest failed with uncorrectable IO error despite having the fix for
7163.  Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also
distinguishes it from that issue.

Definitely seems like a racing condition between the vdev_validate
and spa_sync:
1. Thread A (spa_sync): vdev label is updated to latest txg
2. Thread B (vdev_validate): vdev label's txg is compared to
   spa_last_synced_txg and is ahead.
3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg.

Solution: do not check txg in vdev_validate unless config lock is held.

Authored by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://illumos.org/issues/9187
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/805fda72
Closes #7529
2018-05-14 14:28:09 -04:00
..
avl Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
icp Change movaps to movups in AES-NI code 2018-01-31 15:17:56 -08:00
lua OpenZFS 9035 - zfs: this statement may fall through 2018-02-21 14:55:34 -08:00
nvpair Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
unicode Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
zcommon OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
zfs OpenZFS 9187 - racing condition between vdev label and spa_last_synced_txg in vdev_validate 2018-05-14 14:28:09 -04:00
.gitignore Ignore *.o.ur-safe build artifacts 2018-05-13 18:59:02 -07:00
Makefile.in Ignore *.o.ur-safe build artifacts 2018-05-13 18:59:02 -07:00