diff options
author | Matthew Ahrens <mahrens@delphix.com> | 2015-10-09 21:56:01 -0700 |
---|---|---|
committer | Matthew Ahrens <mahrens@delphix.com> | 2015-10-09 21:56:01 -0700 |
commit | 9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 (patch) | |
tree | 38f7ac42de9d29c9fb4f3d8dfe79416f6db7c6d6 /usr/src/uts/common/fs/zfs/dsl_destroy.c | |
parent | 89fdfac39633dc6769133c82b68b1ed74c2bc54b (diff) | |
download | illumos-gate-9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8.tar.gz |
2605 want to resume interrupted zfs send
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/dsl_destroy.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/dsl_destroy.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/dsl_destroy.c b/usr/src/uts/common/fs/zfs/dsl_destroy.c index c7a623c829..7de9845079 100644 --- a/usr/src/uts/common/fs/zfs/dsl_destroy.c +++ b/usr/src/uts/common/fs/zfs/dsl_destroy.c @@ -968,9 +968,17 @@ dsl_destroy_inconsistent(const char *dsname, void *arg) objset_t *os; if (dmu_objset_hold(dsname, FTAG, &os) == 0) { - boolean_t inconsistent = DS_IS_INCONSISTENT(dmu_objset_ds(os)); + boolean_t need_destroy = DS_IS_INCONSISTENT(dmu_objset_ds(os)); + + /* + * If the dataset is inconsistent because a resumable receive + * has failed, then do not destroy it. + */ + if (dsl_dataset_has_resume_receive_state(dmu_objset_ds(os))) + need_destroy = B_FALSE; + dmu_objset_rele(os, FTAG); - if (inconsistent) + if (need_destroy) (void) dsl_destroy_head(dsname); } return (0); |