#include <linux/atomic.h>
#include <linux/hrtimer.h>
#include <linux/uuid.h>
+#include <linux/t10-pi.h>
#include <net/checksum.h>
static DEFINE_SPINLOCK(sdebug_host_list_lock);
static unsigned char *fake_storep; /* ramdisk storage */
-static struct sd_dif_tuple *dif_storep; /* protection info */
+static struct t10_pi_tuple *dif_storep; /* protection info */
static void *map_storep; /* provisioning map */
static unsigned long map_size;
return fake_storep + lba * sdebug_sector_size;
}
-static struct sd_dif_tuple *dif_store(sector_t sector)
+static struct t10_pi_tuple *dif_store(sector_t sector)
{
sector = sector_div(sector, sdebug_store_sectors);
return csum;
}
-static int dif_verify(struct sd_dif_tuple *sdt, const void *data,
+static int dif_verify(struct t10_pi_tuple *sdt, const void *data,
sector_t sector, u32 ei_lba)
{
__be16 csum = dif_compute_csum(data, sdebug_sector_size);
unsigned int sectors, u32 ei_lba)
{
unsigned int i;
- struct sd_dif_tuple *sdt;
+ struct t10_pi_tuple *sdt;
sector_t sector;
for (i = 0; i < sectors; i++, ei_lba++) {
unsigned int sectors, u32 ei_lba)
{
int ret;
- struct sd_dif_tuple *sdt;
+ struct t10_pi_tuple *sdt;
void *daddr;
sector_t sector = start_sec;
int ppage_offset;
}
for (ppage_offset = 0; ppage_offset < piter.length;
- ppage_offset += sizeof(struct sd_dif_tuple)) {
+ ppage_offset += sizeof(struct t10_pi_tuple)) {
/* If we're at the end of the current
* data page advance to the next one
*/
if (sdebug_dix) {
int dif_size;
- dif_size = sdebug_store_sectors * sizeof(struct sd_dif_tuple);
+ dif_size = sdebug_store_sectors * sizeof(struct t10_pi_tuple);
dif_storep = vmalloc(dif_size);
pr_err("dif_storep %u bytes @ %p\n", dif_size, dif_storep);