aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-09-16 14:51:46 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-09-16 14:52:58 -0400
commitdd3932eddf428571762596e17b65f5dc92ca361b (patch)
tree57cec5ae2f862037f78b7e993323d77955bb6463 /fs/ext4
parent8786fb70ccb36c7cff64680bb80c46d3a09d44db (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 'fs/ext4')
-rw-r--r--fs/ext4/fsync.c5
-rw-r--r--fs/ext4/mballoc.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 592adf2e546e..3f3ff5ee8f9d 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -128,10 +128,9 @@ int ext4_sync_file(struct file *file, int datasync)
128 (journal->j_fs_dev != journal->j_dev) && 128 (journal->j_fs_dev != journal->j_dev) &&
129 (journal->j_flags & JBD2_BARRIER)) 129 (journal->j_flags & JBD2_BARRIER))
130 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, 130 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL,
131 NULL, BLKDEV_IFL_WAIT); 131 NULL);
132 ret = jbd2_log_wait_commit(journal, commit_tid); 132 ret = jbd2_log_wait_commit(journal, commit_tid);
133 } else if (journal->j_flags & JBD2_BARRIER) 133 } else if (journal->j_flags & JBD2_BARRIER)
134 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL, 134 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
135 BLKDEV_IFL_WAIT);
136 return ret; 135 return ret;
137} 136}
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a22bfef3da95..19aa0d44d822 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2566,8 +2566,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
2566 discard_block = block + ext4_group_first_block_no(sb, block_group); 2566 discard_block = block + ext4_group_first_block_no(sb, block_group);
2567 trace_ext4_discard_blocks(sb, 2567 trace_ext4_discard_blocks(sb,
2568 (unsigned long long) discard_block, count); 2568 (unsigned long long) discard_block, count);
2569 ret = sb_issue_discard(sb, discard_block, count, GFP_NOFS, 2569 ret = sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0);
2570 BLKDEV_IFL_WAIT);
2571 if (ret == EOPNOTSUPP) { 2570 if (ret == EOPNOTSUPP) {
2572 ext4_warning(sb, "discard not supported, disabling"); 2571 ext4_warning(sb, "discard not supported, disabling");
2573 clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD); 2572 clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);