Print this page
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <gwilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dnode_sync.c
          +++ new/usr/src/uts/common/fs/zfs/dnode_sync.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2012 by Delphix. All rights reserved.
  23   25   */
  24   26  
  25   27  #include <sys/zfs_context.h>
  26   28  #include <sys/dbuf.h>
  27   29  #include <sys/dnode.h>
  28   30  #include <sys/dmu.h>
  29   31  #include <sys/dmu_tx.h>
  30   32  #include <sys/dmu_objset.h>
  31   33  #include <sys/dsl_dataset.h>
  32   34  #include <sys/spa.h>
↓ open down ↓ 554 lines elided ↑ open up ↑
 587  589          if (dn->dn_next_bonuslen[txgoff]) {
 588  590                  if (dn->dn_next_bonuslen[txgoff] == DN_ZERO_BONUSLEN)
 589  591                          dnp->dn_bonuslen = 0;
 590  592                  else
 591  593                          dnp->dn_bonuslen = dn->dn_next_bonuslen[txgoff];
 592  594                  ASSERT(dnp->dn_bonuslen <= DN_MAX_BONUSLEN);
 593  595                  dn->dn_next_bonuslen[txgoff] = 0;
 594  596          }
 595  597  
 596  598          if (dn->dn_next_bonustype[txgoff]) {
 597      -                ASSERT(dn->dn_next_bonustype[txgoff] < DMU_OT_NUMTYPES);
      599 +                ASSERT(DMU_OT_IS_VALID(dn->dn_next_bonustype[txgoff]));
 598  600                  dnp->dn_bonustype = dn->dn_next_bonustype[txgoff];
 599  601                  dn->dn_next_bonustype[txgoff] = 0;
 600  602          }
 601  603  
 602  604          /*
 603  605           * We will either remove a spill block when a file is being removed
 604  606           * or we have been asked to remove it.
 605  607           */
 606  608          if (dn->dn_rm_spillblk[txgoff] ||
 607  609              ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) &&
↓ open down ↓ 86 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX