diff options
author | Mike Christie <mchristi@redhat.com> | 2016-06-05 15:31:43 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-07 15:41:38 -0400 |
commit | 2a222ca992c35aee1e83af428f3dd26a3f5d5d94 (patch) | |
tree | a5ff0a4f59f8fc44a276dd054ea04314eec1a043 /fs/jbd2 | |
parent | f21508211d2b16e65821abd171378fa6ece126fe (diff) |
fs: have submit_bh users pass in op and flags separately
This has submit_bh users pass in the operation and flags separately,
so submit_bh_wbc can setup the bio op and bi_rw flags on the bio that
is submitted.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/commit.c | 6 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 70078096117d..8f7d1339c973 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
@@ -155,9 +155,9 @@ static int journal_submit_commit_record(journal_t *journal, | |||
155 | 155 | ||
156 | if (journal->j_flags & JBD2_BARRIER && | 156 | if (journal->j_flags & JBD2_BARRIER && |
157 | !jbd2_has_feature_async_commit(journal)) | 157 | !jbd2_has_feature_async_commit(journal)) |
158 | ret = submit_bh(WRITE_SYNC | WRITE_FLUSH_FUA, bh); | 158 | ret = submit_bh(REQ_OP_WRITE, WRITE_SYNC | WRITE_FLUSH_FUA, bh); |
159 | else | 159 | else |
160 | ret = submit_bh(WRITE_SYNC, bh); | 160 | ret = submit_bh(REQ_OP_WRITE, WRITE_SYNC, bh); |
161 | 161 | ||
162 | *cbh = bh; | 162 | *cbh = bh; |
163 | return ret; | 163 | return ret; |
@@ -718,7 +718,7 @@ start_journal_io: | |||
718 | clear_buffer_dirty(bh); | 718 | clear_buffer_dirty(bh); |
719 | set_buffer_uptodate(bh); | 719 | set_buffer_uptodate(bh); |
720 | bh->b_end_io = journal_end_buffer_io_sync; | 720 | bh->b_end_io = journal_end_buffer_io_sync; |
721 | submit_bh(WRITE_SYNC, bh); | 721 | submit_bh(REQ_OP_WRITE, WRITE_SYNC, bh); |
722 | } | 722 | } |
723 | cond_resched(); | 723 | cond_resched(); |
724 | stats.run.rs_blocks_logged += bufs; | 724 | stats.run.rs_blocks_logged += bufs; |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index b31852f76f46..2606de4fa661 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -1346,15 +1346,15 @@ static int journal_reset(journal_t *journal) | |||
1346 | return jbd2_journal_start_thread(journal); | 1346 | return jbd2_journal_start_thread(journal); |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | static int jbd2_write_superblock(journal_t *journal, int write_op) | 1349 | static int jbd2_write_superblock(journal_t *journal, int write_flags) |
1350 | { | 1350 | { |
1351 | struct buffer_head *bh = journal->j_sb_buffer; | 1351 | struct buffer_head *bh = journal->j_sb_buffer; |
1352 | journal_superblock_t *sb = journal->j_superblock; | 1352 | journal_superblock_t *sb = journal->j_superblock; |
1353 | int ret; | 1353 | int ret; |
1354 | 1354 | ||
1355 | trace_jbd2_write_superblock(journal, write_op); | 1355 | trace_jbd2_write_superblock(journal, write_flags); |
1356 | if (!(journal->j_flags & JBD2_BARRIER)) | 1356 | if (!(journal->j_flags & JBD2_BARRIER)) |
1357 | write_op &= ~(REQ_FUA | REQ_FLUSH); | 1357 | write_flags &= ~(REQ_FUA | REQ_FLUSH); |
1358 | lock_buffer(bh); | 1358 | lock_buffer(bh); |
1359 | if (buffer_write_io_error(bh)) { | 1359 | if (buffer_write_io_error(bh)) { |
1360 | /* | 1360 | /* |
@@ -1374,7 +1374,7 @@ static int jbd2_write_superblock(journal_t *journal, int write_op) | |||
1374 | jbd2_superblock_csum_set(journal, sb); | 1374 | jbd2_superblock_csum_set(journal, sb); |
1375 | get_bh(bh); | 1375 | get_bh(bh); |
1376 | bh->b_end_io = end_buffer_write_sync; | 1376 | bh->b_end_io = end_buffer_write_sync; |
1377 | ret = submit_bh(write_op, bh); | 1377 | ret = submit_bh(REQ_OP_WRITE, write_flags, bh); |
1378 | wait_on_buffer(bh); | 1378 | wait_on_buffer(bh); |
1379 | if (buffer_write_io_error(bh)) { | 1379 | if (buffer_write_io_error(bh)) { |
1380 | clear_buffer_write_io_error(bh); | 1380 | clear_buffer_write_io_error(bh); |