Print this page
4374 dn_free_ranges should use range_tree_t
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zap_micro.c
          +++ new/usr/src/uts/common/fs/zfs/zap_micro.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  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   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright (c) 2013 by Delphix. All rights reserved.
       23 + * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  24   24   */
  25   25  
  26   26  #include <sys/zio.h>
  27   27  #include <sys/spa.h>
  28   28  #include <sys/dmu.h>
  29   29  #include <sys/zfs_context.h>
  30   30  #include <sys/zap.h>
  31   31  #include <sys/refcount.h>
  32   32  #include <sys/zap_impl.h>
  33   33  #include <sys/zap_leaf.h>
↓ open down ↓ 333 lines elided ↑ open up ↑
 367  367  
 368  368          zap = kmem_zalloc(sizeof (zap_t), KM_SLEEP);
 369  369          rw_init(&zap->zap_rwlock, 0, 0, 0);
 370  370          rw_enter(&zap->zap_rwlock, RW_WRITER);
 371  371          zap->zap_objset = os;
 372  372          zap->zap_object = obj;
 373  373          zap->zap_dbuf = db;
 374  374  
 375  375          if (*(uint64_t *)db->db_data != ZBT_MICRO) {
 376  376                  mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0);
 377      -                zap->zap_f.zap_block_shift = highbit(db->db_size) - 1;
      377 +                zap->zap_f.zap_block_shift = highbit64(db->db_size) - 1;
 378  378          } else {
 379  379                  zap->zap_ismicro = TRUE;
 380  380          }
 381  381  
 382  382          /*
 383  383           * Make sure that zap_ismicro is set before we let others see
 384  384           * it, because zap_lockdir() checks zap_ismicro without the lock
 385  385           * held.
 386  386           */
 387  387          winner = dmu_buf_set_user(db, zap, &zap->zap_m.zap_phys, zap_evict);
↓ open down ↓ 1028 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX