diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2015-10-21 13:19:33 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-10-21 16:42:38 -0400 |
commit | 0f8087ecdeac921fc4920f1328f55c15080bc6aa (patch) | |
tree | 6027fd7061230f1488f74938b6bebf804be88376 /include/linux/blkdev.h | |
parent | aff34e192e4eeacfb8b5ffc68e10a240f2c0c6d7 (diff) |
block: Consolidate static integrity profile properties
We previously made a complete copy of a device's data integrity profile
even though several of the fields inside the blk_integrity struct are
pointers to fixed template entries in t10-pi.c.
Split the static and per-device portions so that we can reference the
template directly.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 830f9c07d4bb..f36c6476f1c7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1462,16 +1462,18 @@ struct blk_integrity_iter { | |||
1462 | 1462 | ||
1463 | typedef int (integrity_processing_fn) (struct blk_integrity_iter *); | 1463 | typedef int (integrity_processing_fn) (struct blk_integrity_iter *); |
1464 | 1464 | ||
1465 | struct blk_integrity { | 1465 | struct blk_integrity_profile { |
1466 | integrity_processing_fn *generate_fn; | 1466 | integrity_processing_fn *generate_fn; |
1467 | integrity_processing_fn *verify_fn; | 1467 | integrity_processing_fn *verify_fn; |
1468 | 1468 | const char *name; | |
1469 | unsigned short flags; | 1469 | }; |
1470 | unsigned short tuple_size; | ||
1471 | unsigned short interval; | ||
1472 | unsigned short tag_size; | ||
1473 | 1470 | ||
1474 | const char *name; | 1471 | struct blk_integrity { |
1472 | struct blk_integrity_profile *profile; | ||
1473 | unsigned short flags; | ||
1474 | unsigned short tuple_size; | ||
1475 | unsigned short interval; | ||
1476 | unsigned short tag_size; | ||
1475 | }; | 1477 | }; |
1476 | 1478 | ||
1477 | extern bool blk_integrity_is_initialized(struct gendisk *); | 1479 | extern bool blk_integrity_is_initialized(struct gendisk *); |