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/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) 2011 by Delphix. All rights reserved.
       23 + * Copyright (c) 2012 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 ↓ 420 lines elided ↑ open up ↑
 454  454          *zapp = NULL;
 455  455  
 456  456          err = dmu_buf_hold(os, obj, 0, NULL, &db, DMU_READ_NO_PREFETCH);
 457  457          if (err)
 458  458                  return (err);
 459  459  
 460  460  #ifdef ZFS_DEBUG
 461  461          {
 462  462                  dmu_object_info_t doi;
 463  463                  dmu_object_info_from_db(db, &doi);
 464      -                ASSERT(dmu_ot[doi.doi_type].ot_byteswap == zap_byteswap);
      464 +                ASSERT3U(DMU_OT_BYTESWAP(doi.doi_type), ==, DMU_BSWAP_ZAP);
 465  465          }
 466  466  #endif
 467  467  
 468  468          zap = dmu_buf_get_user(db);
 469  469          if (zap == NULL)
 470  470                  zap = mzap_open(os, obj, db);
 471  471  
 472  472          /*
 473  473           * We're checking zap_ismicro without the lock held, in order to
 474  474           * tell what type of lock we want.  Once we have some sort of
↓ open down ↓ 103 lines elided ↑ open up ↑
 578  578  {
 579  579          dmu_buf_t *db;
 580  580          mzap_phys_t *zp;
 581  581  
 582  582          VERIFY(0 == dmu_buf_hold(os, obj, 0, FTAG, &db, DMU_READ_NO_PREFETCH));
 583  583  
 584  584  #ifdef ZFS_DEBUG
 585  585          {
 586  586                  dmu_object_info_t doi;
 587  587                  dmu_object_info_from_db(db, &doi);
 588      -                ASSERT(dmu_ot[doi.doi_type].ot_byteswap == zap_byteswap);
      588 +                ASSERT3U(DMU_OT_BYTESWAP(doi.doi_type), ==, DMU_BSWAP_ZAP);
 589  589          }
 590  590  #endif
 591  591  
 592  592          dmu_buf_will_dirty(db, tx);
 593  593          zp = db->db_data;
 594  594          zp->mz_block_type = ZBT_MICRO;
 595  595          zp->mz_salt = ((uintptr_t)db ^ (uintptr_t)tx ^ (obj << 1)) | 1ULL;
 596  596          zp->mz_normflags = normflags;
 597  597          dmu_buf_rele(db, FTAG);
 598  598  
↓ open down ↓ 858 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX