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>
        
@@ -2545,13 +2545,15 @@
 
         /* byteswap if necessary */
         callback_list = hdr->b_acb;
         ASSERT(callback_list != NULL);
         if (BP_SHOULD_BYTESWAP(zio->io_bp) && zio->io_error == 0) {
+                dmu_object_byteswap_t bswap =
+                    DMU_OT_BYTESWAP(BP_GET_TYPE(zio->io_bp));
                 arc_byteswap_func_t *func = BP_GET_LEVEL(zio->io_bp) > 0 ?
                     byteswap_uint64_array :
-                    dmu_ot[BP_GET_TYPE(zio->io_bp)].ot_byteswap;
+                    dmu_ot_byteswap[bswap].ob_func;
                 func(buf->b_data, hdr->b_size);
         }
 
         arc_cksum_compute(buf, B_FALSE);