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/ddt.c
          +++ new/usr/src/uts/common/fs/zfs/ddt.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   23   * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright (c) 2013 by Delphix. All rights reserved.
       24 + * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  25   25   */
  26   26  
  27   27  #include <sys/zfs_context.h>
  28   28  #include <sys/spa.h>
  29   29  #include <sys/spa_impl.h>
  30   30  #include <sys/zio.h>
  31   31  #include <sys/ddt.h>
  32   32  #include <sys/zap.h>
  33   33  #include <sys/dmu_tx.h>
  34   34  #include <sys/arc.h>
↓ open down ↓ 360 lines elided ↑ open up ↑
 395  395  
 396  396  static void
 397  397  ddt_stat_update(ddt_t *ddt, ddt_entry_t *dde, uint64_t neg)
 398  398  {
 399  399          ddt_stat_t dds;
 400  400          ddt_histogram_t *ddh;
 401  401          int bucket;
 402  402  
 403  403          ddt_stat_generate(ddt, dde, &dds);
 404  404  
 405      -        bucket = highbit(dds.dds_ref_blocks) - 1;
      405 +        bucket = highbit64(dds.dds_ref_blocks) - 1;
 406  406          ASSERT(bucket >= 0);
 407  407  
 408  408          ddh = &ddt->ddt_histogram[dde->dde_type][dde->dde_class];
 409  409  
 410  410          ddt_stat_add(&ddh->ddh_stat[bucket], &dds, neg);
 411  411  }
 412  412  
 413  413  void
 414  414  ddt_histogram_add(ddt_histogram_t *dst, const ddt_histogram_t *src)
 415  415  {
↓ open down ↓ 733 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX