Lines Matching defs:spa
29 #include <sys/spa.h>
176 zio_checksum_dedup_select(spa_t *spa, enum zio_checksum child,
187 return (spa_dedup_checksum(spa));
190 return (spa_dedup_checksum(spa) | ZIO_CHECKSUM_VERIFY);
230 zio_checksum_template_init(enum zio_checksum checksum, spa_t *spa)
236 if (spa->spa_cksum_tmpls[checksum] != NULL)
240 mutex_enter(&spa->spa_cksum_tmpls_lock);
241 if (spa->spa_cksum_tmpls[checksum] == NULL) {
242 spa->spa_cksum_tmpls[checksum] =
243 ci->ci_tmpl_init(&spa->spa_cksum_salt);
244 VERIFY(spa->spa_cksum_tmpls[checksum] != NULL);
246 mutex_exit(&spa->spa_cksum_tmpls_lock);
260 spa_t *spa = zio->io_spa;
265 zio_checksum_template_init(checksum, spa);
286 ci->ci_func[0](data, size, spa->spa_cksum_tmpls[checksum],
290 ci->ci_func[0](data, size, spa->spa_cksum_tmpls[checksum],
296 zio_checksum_error_impl(spa_t *spa, blkptr_t *bp, enum zio_checksum checksum,
306 zio_checksum_template_init(checksum, spa);
347 spa->spa_cksum_tmpls[checksum], &actual_cksum);
358 spa->spa_cksum_tmpls[checksum], &actual_cksum);
387 spa_t *spa = zio->io_spa;
389 error = zio_checksum_error_impl(spa, bp, checksum, data, size,
407 zio_checksum_templates_free(spa_t *spa)
411 if (spa->spa_cksum_tmpls[checksum] != NULL) {
415 ci->ci_tmpl_free(spa->spa_cksum_tmpls[checksum]);
416 spa->spa_cksum_tmpls[checksum] = NULL;