diff options
author | Xin LI <delphij@FreeBSD.org> | 2010-01-07 20:10:22 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2010-01-07 20:10:22 +0000 |
commit | 017b01f6628c01be1ada0397f3cae40670936b1a (patch) | |
tree | 87a987f1f92f10a77a10d502ac8140d6d41090f6 | |
parent | 789ad2d46ac47e873b14ac0868e1ab11e0c2ac63 (diff) | |
download | src-017b01f6628c01be1ada0397f3cae40670936b1a.tar.gz src-017b01f6628c01be1ada0397f3cae40670936b1a.zip |
Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD
revision 200726 and 200727). It looks like that the two revisions
were not applied in the right sequence, I found this when comparing
with the OpenSolaris code.
MFC after: 3 days
Reviewed by: mm@
Notes
Notes:
svn path=/head/; revision=201756
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c index 98032653227a..5c97cd788d25 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c @@ -847,6 +847,12 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) if (err != 0 && err != ENOENT) return (EINVAL); + if (drro->drr_bonuslen) { + data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); + if (ra->err) + return (ra->err); + } + if (err == ENOENT) { /* currently free, want to be allocated */ tx = dmu_tx_create(os); @@ -862,7 +868,6 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) dmu_tx_commit(tx); } else { /* currently allocated, want to be allocated */ - err = dmu_object_reclaim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen); @@ -870,12 +875,6 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) if (err) return (EINVAL); - if (drro->drr_bonuslen) { - data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); - if (ra->err) - return (ra->err); - } - tx = dmu_tx_create(os); dmu_tx_hold_bonus(tx, drro->drr_object); err = dmu_tx_assign(tx, TXG_WAIT); |