linux/block/t10-pi.c

// SPDX-License-Identifier: GPL-2.0
/*
 * t10_pi.c - Functions for generating and verifying T10 Protection
 *	      Information.
 */

#include <linux/t10-pi.h>
#include <linux/blk-integrity.h>
#include <linux/crc-t10dif.h>
#include <linux/crc64.h>
#include <linux/module.h>
#include <net/checksum.h>
#include <asm/unaligned.h>
#include "blk.h"

struct blk_integrity_iter {};

static __be16 t10_pi_csum(__be16 csum, void *data, unsigned int len,
		unsigned char csum_type)
{}

/*
 * Type 1 and Type 2 protection use the same format: 16 bit guard tag,
 * 16 bit app tag, 32 bit reference tag. Type 3 does not define the ref
 * tag.
 */
static void t10_pi_generate(struct blk_integrity_iter *iter,
		struct blk_integrity *bi)
{}

static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
		struct blk_integrity *bi)
{}

/**
 * t10_pi_type1_prepare - prepare PI prior submitting request to device
 * @rq:              request with PI that should be prepared
 *
 * For Type 1/Type 2, the virtual start sector is the one that was
 * originally submitted by the block layer for the ref_tag usage. Due to
 * partitioning, MD/DM cloning, etc. the actual physical start sector is
 * likely to be different. Remap protection information to match the
 * physical LBA.
 */
static void t10_pi_type1_prepare(struct request *rq)
{}

/**
 * t10_pi_type1_complete - prepare PI prior returning request to the blk layer
 * @rq:              request with PI that should be prepared
 * @nr_bytes:        total bytes to prepare
 *
 * For Type 1/Type 2, the virtual start sector is the one that was
 * originally submitted by the block layer for the ref_tag usage. Due to
 * partitioning, MD/DM cloning, etc. the actual physical start sector is
 * likely to be different. Since the physical start sector was submitted
 * to the device, we should remap it back to virtual values expected by the
 * block layer.
 */
static void t10_pi_type1_complete(struct request *rq, unsigned int nr_bytes)
{}

static __be64 ext_pi_crc64(u64 crc, void *data, unsigned int len)
{}

static void ext_pi_crc64_generate(struct blk_integrity_iter *iter,
		struct blk_integrity *bi)
{}

static bool ext_pi_ref_escape(u8 *ref_tag)
{}

static blk_status_t ext_pi_crc64_verify(struct blk_integrity_iter *iter,
		struct blk_integrity *bi)
{}

static void ext_pi_type1_prepare(struct request *rq)
{}

static void ext_pi_type1_complete(struct request *rq, unsigned int nr_bytes)
{}

void blk_integrity_generate(struct bio *bio)
{}

void blk_integrity_verify(struct bio *bio)
{}

void blk_integrity_prepare(struct request *rq)
{}

void blk_integrity_complete(struct request *rq, unsigned int nr_bytes)
{}

MODULE_DESCRIPTION();
MODULE_LICENSE();