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/space_map.c
          +++ new/usr/src/uts/common/fs/zfs/space_map.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /*
  26      - * Copyright (c) 2013 by Delphix. All rights reserved.
       26 + * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  27   27   */
  28   28  
  29   29  #include <sys/zfs_context.h>
  30   30  #include <sys/spa.h>
  31   31  #include <sys/dmu.h>
  32   32  #include <sys/dmu_tx.h>
  33   33  #include <sys/dnode.h>
  34   34  #include <sys/dsl_pool.h>
  35   35  #include <sys/zio.h>
  36   36  #include <sys/space_map.h>
↓ open down ↓ 223 lines elided ↑ open up ↑
 260  260                  /*
 261  261                   * Older software versions treat space map blocks as fixed
 262  262                   * entities. The DMU is capable of handling different block
 263  263                   * sizes making it possible for us to increase the
 264  264                   * block size and maintain backwards compatibility. The
 265  265                   * caveat is that the new block sizes must be a
 266  266                   * power of 2 so that old software can append to the file,
 267  267                   * adding more blocks. The block size can grow until it
 268  268                   * reaches space_map_max_blksz.
 269  269                   */
 270      -                newsz = ISP2(size) ? size : 1ULL << highbit(size);
      270 +                newsz = ISP2(size) ? size : 1ULL << highbit64(size);
 271  271                  if (newsz > space_map_max_blksz)
 272  272                          newsz = space_map_max_blksz;
 273  273  
 274  274                  VERIFY0(dmu_object_set_blocksize(sm->sm_os,
 275  275                      space_map_object(sm), newsz, 0, tx));
 276  276                  dmu_object_size_from_db(sm->sm_dbuf, &blksz, &blocks);
 277  277  
 278  278                  zfs_dbgmsg("txg %llu, spa %s, increasing blksz from %d to %d",
 279  279                      dmu_tx_get_txg(tx), spa_name(dmu_objset_spa(sm->sm_os)),
 280  280                      sm->sm_blksz, blksz);
↓ open down ↓ 323 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX