1 Having struct bio allows us to do more in the genrate/verify_fn,
2 like copying a known good guard tag already available rather than
5 Index: linux-3.10.0-862.9.1.el7/fs/bio-integrity.c
6 ===================================================================
7 --- linux-3.10.0-862.9.1.el7.orig/fs/bio-integrity.c
8 +++ linux-3.10.0-862.9.1.el7/fs/bio-integrity.c
9 @@ -334,6 +334,8 @@ static void bio_integrity_generate(struc
10 bix.data_size = bv->bv_len;
11 bix.prot_buf = prot_buf;
18 @@ -485,6 +487,8 @@ static int bio_integrity_verify(struct b
19 bix.data_size = bv->bv_len;
20 bix.prot_buf = prot_buf;
25 ret = verify_fn(&bix);
27 Index: linux-3.10.0-862.9.1.el7/include/linux/blkdev.h
28 ===================================================================
29 --- linux-3.10.0-862.9.1.el7.orig/include/linux/blkdev.h
30 +++ linux-3.10.0-862.9.1.el7/include/linux/blkdev.h
31 @@ -1699,7 +1699,9 @@ struct blk_integrity_exchg {
33 unsigned int data_size;
34 unsigned short sector_size;
35 + unsigned short bi_idx;
36 const char *disk_name;
40 typedef void (integrity_set_tag_fn) (void *, void *, unsigned int);