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/spa.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/spa.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 14 |
1 files changed, 10 insertions, 4 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 ad85d9c..25503e7 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -258,19 +258,25 @@ spa_prop_get_config(spa_t *spa, nvlist_t **nvp) } if (pool != NULL) { - dsl_dir_t *freedir = pool->dp_free_dir; - /* * The $FREE directory was introduced in SPA_VERSION_DEADLISTS, * when opening pools before this version freedir will be NULL. */ - if (freedir != NULL) { + if (pool->dp_free_dir != NULL) { spa_prop_add_list(*nvp, ZPOOL_PROP_FREEING, NULL, - freedir->dd_phys->dd_used_bytes, src); + pool->dp_free_dir->dd_phys->dd_used_bytes, src); } else { spa_prop_add_list(*nvp, ZPOOL_PROP_FREEING, NULL, 0, src); } + + if (pool->dp_leak_dir != NULL) { + spa_prop_add_list(*nvp, ZPOOL_PROP_LEAKED, NULL, + pool->dp_leak_dir->dd_phys->dd_used_bytes, src); + } else { + spa_prop_add_list(*nvp, ZPOOL_PROP_LEAKED, + NULL, 0, src); + } } spa_prop_add_list(*nvp, ZPOOL_PROP_GUID, NULL, spa_guid(spa), src); |