diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-15 05:00:46 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-15 05:00:46 +0000 |
commit | 91643324a9009cb5fbc8c00544b7781941f0d5d1 (patch) | |
tree | 96763424322b9ebf40886910ff2b76637a13a1d8 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c | |
parent | 9d1dc5bcc93f630c5fc480593d45fbcfebef15f2 (diff) | |
download | FreeBSD-src-91643324a9009cb5fbc8c00544b7781941f0d5d1.zip FreeBSD-src-91643324a9009cb5fbc8c00544b7781941f0d5d1.tar.gz |
MFC r268079: MFV r267566:
4390 i/o errors when deleting filesystem/zvol can lead to space map
corruption
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c index 9fe1961..26a8559 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c @@ -278,6 +278,13 @@ dsl_pool_open(dsl_pool_t *dp) dp->dp_meta_objset, obj)); } + /* + * Note: errors ignored, because the leak dir will not exist if we + * have not encountered a leak yet. + */ + (void) dsl_pool_open_special_dir(dp, LEAK_DIR_NAME, + &dp->dp_leak_dir); + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY)) { err = zap_lookup(dp->dp_meta_objset, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_BPTREE_OBJ, sizeof (uint64_t), 1, @@ -325,6 +332,8 @@ dsl_pool_close(dsl_pool_t *dp) dsl_dir_rele(dp->dp_mos_dir, dp); if (dp->dp_free_dir) dsl_dir_rele(dp->dp_free_dir, dp); + if (dp->dp_leak_dir) + dsl_dir_rele(dp->dp_leak_dir, dp); if (dp->dp_root_dir) dsl_dir_rele(dp->dp_root_dir, dp); |