Lines Matching defs:checksum
37 * In the SPA, everything is checksummed. We support checksum vectors
41 * For SPA metadata, we always want a very strong checksum.
43 * and checksum strength.
54 * Of course, we don't want a checksum upgrade to invalidate existing
55 * data, so we store the checksum *function* in eight bits of the bp.
56 * This gives us room for up to 256 different checksum functions.
58 * When writing a block, we always checksum it with the latest-and-greatest
59 * checksum function of the appropriate strength. When reading a block,
60 * we compare the expected checksum against the actual checksum, which we
61 * compute via the checksum function specified by BP_GET_CHECKSUM(bp).
151 * Generate the checksum.
154 zio_checksum_compute(zio_t *zio, enum zio_checksum checksum,
159 zio_checksum_info_t *ci = &zio_checksum_table[checksum];
162 ASSERT((uint_t)checksum < ZIO_CHECKSUM_FUNCTIONS);
168 if (checksum == ZIO_CHECKSUM_ZILOG2) {
177 if (checksum == ZIO_CHECKSUM_GANG_HEADER)
179 else if (checksum == ZIO_CHECKSUM_LABEL)
195 uint_t checksum = (bp == NULL ? zio->io_prop.zp_checksum :
203 zio_checksum_info_t *ci = &zio_checksum_table[checksum];
206 if (checksum >= ZIO_CHECKSUM_FUNCTIONS || ci->ci_func[0] == NULL)
212 if (checksum == ZIO_CHECKSUM_ZILOG2) {
232 if (checksum == ZIO_CHECKSUM_GANG_HEADER)
234 else if (checksum == ZIO_CHECKSUM_LABEL)