summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-12-24 14:25:25 +0000
committeravg <avg@FreeBSD.org>2016-12-24 14:25:25 +0000
commit3d162939c0984677424451cb3460555cbea11657 (patch)
treeae8b22fba80ad7078fddce787754f16baabb94fc /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
parent2e70302a11d1117fac0b4e0976f4afd4ea5f012f (diff)
downloadFreeBSD-src-3d162939c0984677424451cb3460555cbea11657.zip
FreeBSD-src-3d162939c0984677424451cb3460555cbea11657.tar.gz
MFC r309250: MFV r309249: 3821 Race in rollback, zil close, and zil flush
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
index c94f63d..7f51138 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -6881,8 +6881,6 @@ spa_sync(spa_t *spa, uint64_t txg)
spa->spa_config_syncing = NULL;
}
- spa->spa_ubsync = spa->spa_uberblock;
-
dsl_pool_sync_done(dp, txg);
mutex_enter(&spa->spa_alloc_lock);
@@ -6907,6 +6905,13 @@ spa_sync(spa_t *spa, uint64_t txg)
spa->spa_sync_pass = 0;
+ /*
+ * Update the last synced uberblock here. We want to do this at
+ * the end of spa_sync() so that consumers of spa_last_synced_txg()
+ * will be guaranteed that all the processing associated with
+ * that txg has been completed.
+ */
+ spa->spa_ubsync = spa->spa_uberblock;
spa_config_exit(spa, SCL_CONFIG, FTAG);
spa_handle_ignored_writes(spa);
OpenPOWER on IntegriCloud