196 * entries - header space (2*chunksize)
197 */
198 #define ZAP_LEAF_NUMCHUNKS(bs) \
199 (((1<<bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(bs)) / \
200 ZAP_LEAF_CHUNKSIZE - 2)
201
202 /*
203 * The chunks start immediately after the hash table. The end of the
204 * hash table is at l_hash + HASH_NUMENTRIES, which we simply cast to a
205 * chunk_t.
206 */
207 #define ZAP_LEAF_CHUNK(l, bs, idx) \
208 ((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
209 #define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
210
211 extern void fletcher_2_native(const void *, uint64_t, zio_cksum_t *);
212 extern void fletcher_2_byteswap(const void *, uint64_t, zio_cksum_t *);
213 extern void fletcher_4_native(const void *, uint64_t, zio_cksum_t *);
214 extern void fletcher_4_byteswap(const void *, uint64_t, zio_cksum_t *);
215 extern void zio_checksum_SHA256(const void *, uint64_t, zio_cksum_t *);
216 extern int lzjb_decompress(void *, void *, size_t, size_t);
217 extern int lz4_decompress(void *, void *, size_t, size_t);
218
219 #endif /* FSYS_ZFS */
220
221 #endif /* !_FSYS_ZFS_H */
|
196 * entries - header space (2*chunksize)
197 */
198 #define ZAP_LEAF_NUMCHUNKS(bs) \
199 (((1<<bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(bs)) / \
200 ZAP_LEAF_CHUNKSIZE - 2)
201
202 /*
203 * The chunks start immediately after the hash table. The end of the
204 * hash table is at l_hash + HASH_NUMENTRIES, which we simply cast to a
205 * chunk_t.
206 */
207 #define ZAP_LEAF_CHUNK(l, bs, idx) \
208 ((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
209 #define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
210
211 extern void fletcher_2_native(const void *, uint64_t, zio_cksum_t *);
212 extern void fletcher_2_byteswap(const void *, uint64_t, zio_cksum_t *);
213 extern void fletcher_4_native(const void *, uint64_t, zio_cksum_t *);
214 extern void fletcher_4_byteswap(const void *, uint64_t, zio_cksum_t *);
215 extern void zio_checksum_SHA256(const void *, uint64_t, zio_cksum_t *);
216 extern void zio_checksum_EdonR512_256(const void *, uint64_t, zio_cksum_t *);
217 extern void zio_checksum_EdonR512_256_byteswap(const void *, uint64_t,
218 zio_cksum_t *);
219 extern int lzjb_decompress(void *, void *, size_t, size_t);
220 extern int lz4_decompress(void *, void *, size_t, size_t);
221
222 #endif /* FSYS_ZFS */
223
224 #endif /* !_FSYS_ZFS_H */
|