aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5cf17a49ce38..59b9aed0ee7d 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -998,12 +998,16 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
998 return NULL; 998 return NULL;
999 return bqt->tag_index[tag]; 999 return bqt->tag_index[tag];
1000} 1000}
1001 1001enum{
1002extern int blkdev_issue_flush(struct block_device *, sector_t *); 1002 BLKDEV_WAIT, /* wait for completion */
1003#define DISCARD_FL_WAIT 0x01 /* wait for completion */ 1003 BLKDEV_BARRIER, /*issue request with barrier */
1004#define DISCARD_FL_BARRIER 0x02 /* issue DISCARD_BARRIER request */ 1004};
1005extern int blkdev_issue_discard(struct block_device *, sector_t sector, 1005#define BLKDEV_IFL_WAIT (1 << BLKDEV_WAIT)
1006 sector_t nr_sects, gfp_t, int flags); 1006#define BLKDEV_IFL_BARRIER (1 << BLKDEV_BARRIER)
1007extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *,
1008 unsigned long);
1009extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
1010 sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
1007 1011
1008static inline int sb_issue_discard(struct super_block *sb, 1012static inline int sb_issue_discard(struct super_block *sb,
1009 sector_t block, sector_t nr_blocks) 1013 sector_t block, sector_t nr_blocks)
@@ -1011,7 +1015,7 @@ static inline int sb_issue_discard(struct super_block *sb,
1011 block <<= (sb->s_blocksize_bits - 9); 1015 block <<= (sb->s_blocksize_bits - 9);
1012 nr_blocks <<= (sb->s_blocksize_bits - 9); 1016 nr_blocks <<= (sb->s_blocksize_bits - 9);
1013 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL, 1017 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL,
1014 DISCARD_FL_BARRIER); 1018 BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
1015} 1019}
1016 1020
1017extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); 1021extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);