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/vdev_disk.c
          +++ new/usr/src/uts/common/fs/zfs/vdev_disk.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) 2012, 2014 by Delphix. All rights reserved.
  24   24   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  25   25   * Copyright (c) 2013 Joyent, Inc.  All rights reserved.
  26   26   */
  27   27  
  28   28  #include <sys/zfs_context.h>
  29   29  #include <sys/zfs_zone.h>
  30   30  #include <sys/spa_impl.h>
  31   31  #include <sys/refcount.h>
  32   32  #include <sys/vdev_disk.h>
  33   33  #include <sys/vdev_impl.h>
↓ open down ↓ 507 lines elided ↑ open up ↑
 541  541                  capacity = dkm->dki_capacity - 1;
 542  542                  blksz = dkm->dki_lbsize;
 543  543                  pbsize = blksz;
 544  544          } else {
 545  545                  VDEV_DEBUG("vdev_disk_open(\"%s\"): "
 546  546                      "both DKIOCGMEDIAINFO{,EXT} calls failed, %d\n",
 547  547                      vd->vdev_path, error);
 548  548                  pbsize = DEV_BSIZE;
 549  549          }
 550  550  
 551      -        *ashift = highbit(MAX(pbsize, SPA_MINBLOCKSIZE)) - 1;
      551 +        *ashift = highbit64(MAX(pbsize, SPA_MINBLOCKSIZE)) - 1;
 552  552  
 553  553          if (vd->vdev_wholedisk == 1) {
 554  554                  int wce = 1;
 555  555  
 556  556                  if (error == 0) {
 557  557                          /*
 558  558                           * If we have the capability to expand, we'd have
 559  559                           * found out via success from DKIOCGMEDIAINFO{,EXT}.
 560  560                           * Adjust max_psize upward accordingly since we know
 561  561                           * we own the whole disk now.
↓ open down ↓ 382 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX