]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
block: cleanup some of the integrity stuff in blkdev.h
authorJens Axboe <jens.axboe@oracle.com>
Thu, 18 Sep 2008 16:31:53 +0000 (09:31 -0700)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:17 +0000 (08:56 +0200)
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>
fs/bio-integrity.c
include/linux/blkdev.h

index c3e174b35fe6a179baac8ef098b465f0ab51f515..ba4ada08564a8d9ac7caff84c61fe321c7b61e3d 100644 (file)
@@ -150,6 +150,29 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
 }
 EXPORT_SYMBOL(bio_integrity_add_page);
 
+static struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
+{
+       return bdev->bd_disk->integrity;
+}
+
+static int bdev_integrity_enabled(struct block_device *bdev, int rw)
+{
+       struct blk_integrity *bi = bdev_get_integrity(bdev);
+
+       if (bi == NULL)
+               return 0;
+
+       if (rw == READ && bi->verify_fn != NULL &&
+           (bi->flags & INTEGRITY_FLAG_READ))
+               return 1;
+
+       if (rw == WRITE && bi->generate_fn != NULL &&
+           (bi->flags & INTEGRITY_FLAG_WRITE))
+               return 1;
+
+       return 0;
+}
+
 /**
  * bio_integrity_enabled - Check whether integrity can be passed
  * @bio:       bio to check
@@ -313,6 +336,14 @@ static void bio_integrity_generate(struct bio *bio)
        }
 }
 
+static inline unsigned short blk_integrity_tuple_size(struct blk_integrity *bi)
+{
+       if (bi)
+               return bi->tuple_size;
+
+       return 0;
+}
+
 /**
  * bio_integrity_prep - Prepare bio for integrity I/O
  * @bio:       bio to prepare
index e34999d14c16d9df9f663a6e48a3d2a754522165..e23b838825bd2c39b2fabdb67624adcbfc2247a2 100644 (file)
@@ -1004,47 +1004,6 @@ extern int blk_integrity_compare(struct block_device *, struct block_device *);
 extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
 extern int blk_rq_count_integrity_sg(struct request *);
 
-static inline unsigned short blk_integrity_tuple_size(struct blk_integrity *bi)
-{
-       if (bi)
-               return bi->tuple_size;
-
-       return 0;
-}
-
-static inline struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
-{
-       return bdev->bd_disk->integrity;
-}
-
-static inline unsigned int bdev_get_tag_size(struct block_device *bdev)
-{
-       struct blk_integrity *bi = bdev_get_integrity(bdev);
-
-       if (bi)
-               return bi->tag_size;
-
-       return 0;
-}
-
-static inline int bdev_integrity_enabled(struct block_device *bdev, int rw)
-{
-       struct blk_integrity *bi = bdev_get_integrity(bdev);
-
-       if (bi == NULL)
-               return 0;
-
-       if (rw == READ && bi->verify_fn != NULL &&
-           (bi->flags & INTEGRITY_FLAG_READ))
-               return 1;
-
-       if (rw == WRITE && bi->generate_fn != NULL &&
-           (bi->flags & INTEGRITY_FLAG_WRITE))
-               return 1;
-
-       return 0;
-}
-
 static inline int blk_integrity_rq(struct request *rq)
 {
        if (rq->bio == NULL)
@@ -1058,8 +1017,6 @@ static inline int blk_integrity_rq(struct request *rq)
 #define blk_integrity_rq(rq)                   (0)
 #define blk_rq_count_integrity_sg(a)           (0)
 #define blk_rq_map_integrity_sg(a, b)          (0)
-#define bdev_get_integrity(a)                  (0)
-#define bdev_get_tag_size(a)                   (0)
 #define blk_integrity_compare(a, b)            (0)
 #define blk_integrity_register(a, b)           (0)
 #define blk_integrity_unregister(a)            do { } while (0);