Commit 61002f7d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

ext4: do not send discards as barriers

ext4 already uses synchronous discards, no need to add I/O barriers.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 9c35575b
...@@ -2567,7 +2567,7 @@ static inline void ext4_issue_discard(struct super_block *sb, ...@@ -2567,7 +2567,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
trace_ext4_discard_blocks(sb, trace_ext4_discard_blocks(sb,
(unsigned long long) discard_block, count); (unsigned long long) discard_block, count);
ret = sb_issue_discard(sb, discard_block, count, GFP_NOFS, ret = sb_issue_discard(sb, discard_block, count, GFP_NOFS,
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER); BLKDEV_IFL_WAIT);
if (ret == EOPNOTSUPP) { if (ret == EOPNOTSUPP) {
ext4_warning(sb, "discard not supported, disabling"); ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD); clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment