aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-09-18 12:31:53 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:17 -0400
commit9c02f2b02e29a2244e36c6e1f246080d8afc6cff (patch)
treed917ffa2e6ea5a75d180b72cc16e786da6a4b437 /include
parent7ba1fbaa4a478f72fbaf5a56af9c82a77966b4c7 (diff)
block: cleanup some of the integrity stuff in blkdev.h
Don't put functions that are only used in fs/bio-integrity.c in blkdev.h, it's much cleaner to just keep it in there. Also kill completely unused bdev_get_tag_size() Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e34999d14c16..e23b838825bd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1004,47 +1004,6 @@ extern int blk_integrity_compare(struct block_device *, struct block_device *);
1004extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *); 1004extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
1005extern int blk_rq_count_integrity_sg(struct request *); 1005extern int blk_rq_count_integrity_sg(struct request *);
1006 1006
1007static inline unsigned short blk_integrity_tuple_size(struct blk_integrity *bi)
1008{
1009 if (bi)
1010 return bi->tuple_size;
1011
1012 return 0;
1013}
1014
1015static inline struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
1016{
1017 return bdev->bd_disk->integrity;
1018}
1019
1020static inline unsigned int bdev_get_tag_size(struct block_device *bdev)
1021{
1022 struct blk_integrity *bi = bdev_get_integrity(bdev);
1023
1024 if (bi)
1025 return bi->tag_size;
1026
1027 return 0;
1028}
1029
1030static inline int bdev_integrity_enabled(struct block_device *bdev, int rw)
1031{
1032 struct blk_integrity *bi = bdev_get_integrity(bdev);
1033
1034 if (bi == NULL)
1035 return 0;
1036
1037 if (rw == READ && bi->verify_fn != NULL &&
1038 (bi->flags & INTEGRITY_FLAG_READ))
1039 return 1;
1040
1041 if (rw == WRITE && bi->generate_fn != NULL &&
1042 (bi->flags & INTEGRITY_FLAG_WRITE))
1043 return 1;
1044
1045 return 0;
1046}
1047
1048static inline int blk_integrity_rq(struct request *rq) 1007static inline int blk_integrity_rq(struct request *rq)
1049{ 1008{
1050 if (rq->bio == NULL) 1009 if (rq->bio == NULL)
@@ -1058,8 +1017,6 @@ static inline int blk_integrity_rq(struct request *rq)
1058#define blk_integrity_rq(rq) (0) 1017#define blk_integrity_rq(rq) (0)
1059#define blk_rq_count_integrity_sg(a) (0) 1018#define blk_rq_count_integrity_sg(a) (0)
1060#define blk_rq_map_integrity_sg(a, b) (0) 1019#define blk_rq_map_integrity_sg(a, b) (0)
1061#define bdev_get_integrity(a) (0)
1062#define bdev_get_tag_size(a) (0)
1063#define blk_integrity_compare(a, b) (0) 1020#define blk_integrity_compare(a, b) (0)
1064#define blk_integrity_register(a, b) (0) 1021#define blk_integrity_register(a, b) (0)
1065#define blk_integrity_unregister(a) do { } while (0); 1022#define blk_integrity_unregister(a) do { } while (0);