Print this page

        

@@ -406,10 +406,11 @@
 {
         blkptr_t bp;
         dmu_object_type_info_t *doti;
         zio_compress_info_t *zct;
         zio_checksum_info_t *zci;
+        zio_crypt_info_t *zcc;
         int i;
         char buf[MAXPATHLEN];
 
         if (mdb_vread(&bp, sizeof (blkptr_t), addr) == -1) {
                 mdb_warn("failed to read blkptr_t");

@@ -435,10 +436,17 @@
         for (i = 0; i < ZIO_COMPRESS_FUNCTIONS; i++) {
                 mdb_readstr(buf, sizeof (buf), (uintptr_t)zct[i].ci_name);
                 zct[i].ci_name = local_strdup(buf);
         }
 
+        if (read_symbol("zio_crypt_table", (void **)&zcc) != DCMD_OK)
+                return (DCMD_ERR);
+        for (i = 0; i < ZIO_CRYPT_FUNCTIONS; i++) {
+                mdb_readstr(buf, sizeof (buf), (uintptr_t)zcc[i].ci_name);
+                zcc[i].ci_name = local_strdup(buf);
+        }
+
         /*
          * Super-ick warning:  This code is also duplicated in
          * cmd/zdb.c .   Yeah, I hate code replication, too.
          */
         for (i = 0; i < BP_GET_NDVAS(&bp); i++) {

@@ -461,13 +469,14 @@
         mdb_printf("ENDIAN: %6s\t\t\t\t\tTYPE:  %s\n",
             BP_GET_BYTEORDER(&bp) ? "LITTLE" : "BIG",
             doti[BP_GET_TYPE(&bp)].ot_name);
         mdb_printf("BIRTH:  %-16llx   LEVEL: %-2d\tFILL:  %llx\n",
             bp.blk_birth, BP_GET_LEVEL(&bp), bp.blk_fill);
-        mdb_printf("CKFUNC: %-16s\t\tCOMP:  %s\n",
+        mdb_printf("CKFUNC: %-16s\tCOMP: %s\tCRYPT: %s\n",
             zci[BP_GET_CHECKSUM(&bp)].ci_name,
-            zct[BP_GET_COMPRESS(&bp)].ci_name);
+            zct[BP_GET_COMPRESS(&bp)].ci_name,
+            zcc[BP_GET_CRYPT(&bp)].ci_name);
         mdb_printf("CKSUM:  %llx:%llx:%llx:%llx\n",
             bp.blk_cksum.zc_word[0],
             bp.blk_cksum.zc_word[1],
             bp.blk_cksum.zc_word[2],
             bp.blk_cksum.zc_word[3]);