aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2010-10-27 21:30:04 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-10-27 21:30:04 -0400
commite6fa0be699449d28a20e815bfe9ce26725ec4962 (patch)
tree2e979f57060c50a73eef51fdbc19d4666d463c4e /include/linux/blkdev.h
parent5c2178e785244341d1e6f2bc3b62f20a337cc44f (diff)
Add helper function for blkdev_issue_zeroout (sb_issue_discard)
This is done the same way as helper sb_issue_discard for blkdev_issue_discard. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2c54906f678f..e5cb4d029689 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -941,6 +941,14 @@ static inline int sb_issue_discard(struct super_block *sb,
941 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_NOFS, 941 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_NOFS,
942 BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER); 942 BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
943} 943}
944static inline int sb_issue_zeroout(struct super_block *sb, sector_t block,
945 sector_t nr_blocks, gfp_t gfp_mask, unsigned long flags)
946{
947 return blkdev_issue_zeroout(sb->s_bdev,
948 block << (sb->s_blocksize_bits - 9),
949 nr_blocks << (sb->s_blocksize_bits - 9),
950 gfp_mask, flags);
951}
944 952
945extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); 953extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
946 954