Author: delphij
Date: Thu Jan  7 20:10:22 2010
New Revision: 201756
URL: http://svn.freebsd.org/changeset/base/201756

Log:
  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@

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c      Thu Jan 
 7 19:40:11 2010        (r201755)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c      Thu Jan 
 7 20:10:22 2010        (r201756)
@@ -847,6 +847,12 @@ restore_object(struct restorearg *ra, ob
        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, ob
                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, ob
        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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to