#ifndef DM_VERITY_H
#define DM_VERITY_H
#include <linux/dm-io.h>
#include <linux/dm-bufio.h>
#include <linux/device-mapper.h>
#include <linux/interrupt.h>
#include <crypto/hash.h>
#define DM_VERITY_MAX_LEVELS …
enum verity_mode { … };
enum verity_block_type { … };
struct dm_verity_fec;
struct dm_verity { … };
struct dm_verity_io { … };
static inline void *verity_io_hash_req(struct dm_verity *v,
struct dm_verity_io *io)
{ … }
static inline u8 *verity_io_real_digest(struct dm_verity *v,
struct dm_verity_io *io)
{ … }
static inline u8 *verity_io_want_digest(struct dm_verity *v,
struct dm_verity_io *io)
{ … }
extern int verity_hash(struct dm_verity *v, struct dm_verity_io *io,
const u8 *data, size_t len, u8 *digest, bool may_sleep);
extern int verity_hash_for_block(struct dm_verity *v, struct dm_verity_io *io,
sector_t block, u8 *digest, bool *is_zero);
extern bool dm_is_verity_target(struct dm_target *ti);
extern int dm_verity_get_mode(struct dm_target *ti);
extern int dm_verity_get_root_digest(struct dm_target *ti, u8 **root_digest,
unsigned int *digest_size);
#endif