diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2008-10-02 12:47:49 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:22 -0400 |
commit | b02739b01c5309d74a59859f2ce92c931d1f1955 (patch) | |
tree | d435454dba5ebb10233069f9f4547df3a140ef28 /include/linux/blkdev.h | |
parent | ad7fce93147d32ae53d25d9ea1a8ba31a239deee (diff) |
block: gendisk integrity wrapper
This is a wrapper for accessing a gendisk's integrity bits. It allows
the integrity support in MD to be compiled with BLK_DEV_INTEGRITY off.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 00d340b0f758..a92d9e4ea96e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1022,6 +1022,11 @@ struct blk_integrity *bdev_get_integrity(struct block_device *bdev) | |||
1022 | return bdev->bd_disk->integrity; | 1022 | return bdev->bd_disk->integrity; |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk) | ||
1026 | { | ||
1027 | return disk->integrity; | ||
1028 | } | ||
1029 | |||
1025 | static inline int blk_integrity_rq(struct request *rq) | 1030 | static inline int blk_integrity_rq(struct request *rq) |
1026 | { | 1031 | { |
1027 | if (rq->bio == NULL) | 1032 | if (rq->bio == NULL) |
@@ -1036,6 +1041,7 @@ static inline int blk_integrity_rq(struct request *rq) | |||
1036 | #define blk_rq_count_integrity_sg(a) (0) | 1041 | #define blk_rq_count_integrity_sg(a) (0) |
1037 | #define blk_rq_map_integrity_sg(a, b) (0) | 1042 | #define blk_rq_map_integrity_sg(a, b) (0) |
1038 | #define bdev_get_integrity(a) (0) | 1043 | #define bdev_get_integrity(a) (0) |
1044 | #define blk_get_integrity(a) (0) | ||
1039 | #define blk_integrity_compare(a, b) (0) | 1045 | #define blk_integrity_compare(a, b) (0) |
1040 | #define blk_integrity_register(a, b) (0) | 1046 | #define blk_integrity_register(a, b) (0) |
1041 | #define blk_integrity_unregister(a) do { } while (0); | 1047 | #define blk_integrity_unregister(a) do { } while (0); |