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/arc.c
          +++ new/usr/src/uts/common/fs/zfs/arc.c
↓ open down ↓ 2539 lines elided ↑ open up ↑
2540 2540              (found == hdr && HDR_L2_READING(hdr)));
2541 2541  
2542 2542          hdr->b_flags &= ~ARC_L2_EVICTED;
2543 2543          if (l2arc_noprefetch && (hdr->b_flags & ARC_PREFETCH))
2544 2544                  hdr->b_flags &= ~ARC_L2CACHE;
2545 2545  
2546 2546          /* byteswap if necessary */
2547 2547          callback_list = hdr->b_acb;
2548 2548          ASSERT(callback_list != NULL);
2549 2549          if (BP_SHOULD_BYTESWAP(zio->io_bp) && zio->io_error == 0) {
     2550 +                dmu_object_byteswap_t bswap =
     2551 +                    DMU_OT_BYTESWAP(BP_GET_TYPE(zio->io_bp));
2550 2552                  arc_byteswap_func_t *func = BP_GET_LEVEL(zio->io_bp) > 0 ?
2551 2553                      byteswap_uint64_array :
2552      -                    dmu_ot[BP_GET_TYPE(zio->io_bp)].ot_byteswap;
     2554 +                    dmu_ot_byteswap[bswap].ob_func;
2553 2555                  func(buf->b_data, hdr->b_size);
2554 2556          }
2555 2557  
2556 2558          arc_cksum_compute(buf, B_FALSE);
2557 2559  
2558 2560          if (hash_lock && zio->io_error == 0 && hdr->b_state == arc_anon) {
2559 2561                  /*
2560 2562                   * Only call arc_access on anonymous buffers.  This is because
2561 2563                   * if we've issued an I/O for an evicted buffer, we've already
2562 2564                   * called arc_access (to prevent any simultaneous readers from
↓ open down ↓ 2111 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX