Author: delphij
Date: Sun Jan 10 07:08:11 2010
New Revision: 201987
URL: http://svn.freebsd.org/changeset/base/201987

Log:
  MFC r201756:
  
  Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD
  revision 200726 and 200727).
  
  Reviewed by:  mm@

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Sun Jan 
10 05:46:19 2010        (r201986)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Sun Jan 
10 07:08:11 2010        (r201987)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to