diff options
author | mm <mm@FreeBSD.org> | 2012-09-05 12:02:09 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-09-05 12:02:09 +0000 |
commit | 3a59a28395e506fbec113160179d4c50fe9b3c25 (patch) | |
tree | 9cb7bfc2b298035a5e16527a5e95add3afffa44a /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c | |
parent | dfb185f5592710a31d133dc2ce652110587f6c1e (diff) | |
download | FreeBSD-src-3a59a28395e506fbec113160179d4c50fe9b3c25.zip FreeBSD-src-3a59a28395e506fbec113160179d4c50fe9b3c25.tar.gz |
Merge recent vendor changes and sync code:
1862 incremental zfs receive fails for sparse file > 8PB
3112 ztest does not honor ZFS_DEBUG
3122 zfs destroy filesystem should prefetch blocks
3129 'zpool reopen' restarts resilvers
3130 ztest failure: Assertion failed:
0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10)
References:
https://www.illumos.org/issues/1862
https://www.illumos.org/issues/3112
https://www.illumos.org/issues/3122
https://www.illumos.org/issues/3129
https://www.illumos.org/issues/3130
Obtained from: illumos (vendor/illumos, vendor/illumos-sys)
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c index a853de7..5cd5a9d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c @@ -306,6 +306,9 @@ spa_history_log(spa_t *spa, const char *history_str, history_log_type_t what) ASSERT(what != LOG_INTERNAL); + if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY || !spa_writeable(spa)) + return (EINVAL); + tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); err = dmu_tx_assign(tx, TXG_WAIT); if (err) { @@ -435,8 +438,9 @@ log_internal(history_internal_events_t event, spa_t *spa, /* * If this is part of creating a pool, not everything is * initialized yet, so don't bother logging the internal events. + * Likewise if the pool is not writeable. */ - if (tx->tx_txg == TXG_INITIAL) + if (tx->tx_txg == TXG_INITIAL || !spa_writeable(spa)) return; va_copy(adx2, adx); |