diff options
author | Christoph Hellwig <hch@lst.de> | 2010-09-16 14:51:46 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-16 14:52:58 -0400 |
commit | dd3932eddf428571762596e17b65f5dc92ca361b (patch) | |
tree | 57cec5ae2f862037f78b7e993323d77955bb6463 /include/linux/blkdev.h | |
parent | 8786fb70ccb36c7cff64680bb80c46d3a09d44db (diff) |
block: remove BLKDEV_IFL_WAIT
All the blkdev_issue_* helpers can only sanely be used for synchronous
caller. To issue cache flushes or barriers asynchronously the caller needs
to set up a bio by itself with a completion callback to move the asynchronous
state machine ahead. So drop the BLKDEV_IFL_WAIT flag that is always
specified when calling blkdev_issue_* and also remove the now unused flags
argument to blkdev_issue_flush and blkdev_issue_zeroout. For
blkdev_issue_discard we need to keep it for the secure discard flag, which
gains a more descriptive name and loses the bitops vs flag confusion.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index cfcb3a610605..accbd0e5c893 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -867,18 +867,14 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | |||
867 | return NULL; | 867 | return NULL; |
868 | return bqt->tag_index[tag]; | 868 | return bqt->tag_index[tag]; |
869 | } | 869 | } |
870 | enum{ | 870 | |
871 | BLKDEV_WAIT, /* wait for completion */ | 871 | #define BLKDEV_DISCARD_SECURE 0x01 /* secure discard */ |
872 | BLKDEV_SECURE, /* secure discard */ | 872 | |
873 | }; | 873 | extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *); |
874 | #define BLKDEV_IFL_WAIT (1 << BLKDEV_WAIT) | ||
875 | #define BLKDEV_IFL_SECURE (1 << BLKDEV_SECURE) | ||
876 | extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *, | ||
877 | unsigned long); | ||
878 | extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector, | 874 | extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector, |
879 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | 875 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); |
880 | extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, | 876 | extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, |
881 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | 877 | sector_t nr_sects, gfp_t gfp_mask); |
882 | static inline int sb_issue_discard(struct super_block *sb, sector_t block, | 878 | static inline int sb_issue_discard(struct super_block *sb, sector_t block, |
883 | sector_t nr_blocks, gfp_t gfp_mask, unsigned long flags) | 879 | sector_t nr_blocks, gfp_t gfp_mask, unsigned long flags) |
884 | { | 880 | { |