Print this page
Integrated Edon-R hash function.


  45         int             ci_eck;         /* uses zio embedded checksum? */
  46         int             ci_dedup;       /* strong enough for dedup? */
  47         char            *ci_name;       /* descriptive name */
  48 } zio_checksum_info_t;
  49 
  50 typedef struct zio_bad_cksum {
  51         zio_cksum_t             zbc_expected;
  52         zio_cksum_t             zbc_actual;
  53         const char              *zbc_checksum_name;
  54         uint8_t                 zbc_byteswapped;
  55         uint8_t                 zbc_injected;
  56         uint8_t                 zbc_has_cksum;  /* expected/actual valid */
  57 } zio_bad_cksum_t;
  58 
  59 extern zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS];
  60 
  61 /*
  62  * Checksum routines.
  63  */
  64 extern zio_checksum_t zio_checksum_SHA256;


  65 
  66 extern void zio_checksum_compute(zio_t *zio, enum zio_checksum checksum,
  67     void *data, uint64_t size);
  68 extern int zio_checksum_error(zio_t *zio, zio_bad_cksum_t *out);
  69 extern enum zio_checksum spa_dedup_checksum(spa_t *spa);
  70 
  71 #ifdef  __cplusplus
  72 }
  73 #endif
  74 
  75 #endif  /* _SYS_ZIO_CHECKSUM_H */


  45         int             ci_eck;         /* uses zio embedded checksum? */
  46         int             ci_dedup;       /* strong enough for dedup? */
  47         char            *ci_name;       /* descriptive name */
  48 } zio_checksum_info_t;
  49 
  50 typedef struct zio_bad_cksum {
  51         zio_cksum_t             zbc_expected;
  52         zio_cksum_t             zbc_actual;
  53         const char              *zbc_checksum_name;
  54         uint8_t                 zbc_byteswapped;
  55         uint8_t                 zbc_injected;
  56         uint8_t                 zbc_has_cksum;  /* expected/actual valid */
  57 } zio_bad_cksum_t;
  58 
  59 extern zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS];
  60 
  61 /*
  62  * Checksum routines.
  63  */
  64 extern zio_checksum_t zio_checksum_SHA256;
  65 extern zio_checksum_t zio_checksum_EdonR512_256;
  66 extern zio_checksum_t zio_checksum_EdonR512_256_byteswap;
  67 
  68 extern void zio_checksum_compute(zio_t *zio, enum zio_checksum checksum,
  69     void *data, uint64_t size);
  70 extern int zio_checksum_error(zio_t *zio, zio_bad_cksum_t *out);
  71 extern enum zio_checksum spa_dedup_checksum(spa_t *spa);
  72 
  73 #ifdef  __cplusplus
  74 }
  75 #endif
  76 
  77 #endif  /* _SYS_ZIO_CHECKSUM_H */