@@ -214,7 +214,7 @@ static blk_status_t bio_integrity_process(struct bio *bio,
iter.data_buf = kaddr + bv.bv_offset;
iter.data_size = bv.bv_len;
- ret = proc_fn(&iter);
+ ret = proc_fn(bio, &iter);
if (ret) {
kunmap_atomic(kaddr);
return ret;
@@ -384,7 +384,8 @@ static struct kobj_type integrity_ktype = {
.sysfs_ops = &integrity_ops,
};
-static blk_status_t blk_integrity_nop_fn(struct blk_integrity_iter *iter)
+static blk_status_t blk_integrity_nop_fn(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return BLK_STS_OK;
}
@@ -117,42 +117,50 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
return BLK_STS_OK;
}
-static blk_status_t t10_pi_type1_generate_crc(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type1_generate_crc(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_generate(iter, t10_pi_crc_fn, 1);
}
-static blk_status_t t10_pi_type1_generate_ip(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type1_generate_ip(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_generate(iter, t10_pi_ip_fn, 1);
}
-static blk_status_t t10_pi_type1_verify_crc(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type1_verify_crc(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_verify(iter, t10_pi_crc_fn, 1);
}
-static blk_status_t t10_pi_type1_verify_ip(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type1_verify_ip(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_verify(iter, t10_pi_ip_fn, 1);
}
-static blk_status_t t10_pi_type3_generate_crc(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type3_generate_crc(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_generate(iter, t10_pi_crc_fn, 3);
}
-static blk_status_t t10_pi_type3_generate_ip(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type3_generate_ip(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_generate(iter, t10_pi_ip_fn, 3);
}
-static blk_status_t t10_pi_type3_verify_crc(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type3_verify_crc(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_verify(iter, t10_pi_crc_fn, 3);
}
-static blk_status_t t10_pi_type3_verify_ip(struct blk_integrity_iter *iter)
+static blk_status_t t10_pi_type3_verify_ip(struct bio *bio,
+ struct blk_integrity_iter *iter)
{
return t10_pi_verify(iter, t10_pi_ip_fn, 3);
}
@@ -1805,7 +1805,8 @@ struct blk_integrity_iter {
const char *disk_name;
};
-typedef blk_status_t (integrity_processing_fn) (struct blk_integrity_iter *);
+typedef blk_status_t (integrity_processing_fn) (struct bio *,
+ struct blk_integrity_iter *);
struct blk_integrity_profile {
integrity_processing_fn *generate_fn;