block,fs: use REQ_* flags directly
Remove the WRITE_* and READ_SYNC wrappers, and just use the flags directly. Where applicable this also drops usage of the bio_set_op_attrs wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
a2b809672e
commit
70fd76140a
@@ -155,9 +155,10 @@ static int journal_submit_commit_record(journal_t *journal,
|
||||
|
||||
if (journal->j_flags & JBD2_BARRIER &&
|
||||
!jbd2_has_feature_async_commit(journal))
|
||||
ret = submit_bh(REQ_OP_WRITE, WRITE_SYNC | WRITE_FLUSH_FUA, bh);
|
||||
ret = submit_bh(REQ_OP_WRITE,
|
||||
REQ_SYNC | REQ_PREFLUSH | REQ_FUA, bh);
|
||||
else
|
||||
ret = submit_bh(REQ_OP_WRITE, WRITE_SYNC, bh);
|
||||
ret = submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
|
||||
|
||||
*cbh = bh;
|
||||
return ret;
|
||||
@@ -402,7 +403,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
|
||||
jbd2_journal_update_sb_log_tail(journal,
|
||||
journal->j_tail_sequence,
|
||||
journal->j_tail,
|
||||
WRITE_SYNC);
|
||||
REQ_SYNC);
|
||||
mutex_unlock(&journal->j_checkpoint_mutex);
|
||||
} else {
|
||||
jbd_debug(3, "superblock not updated\n");
|
||||
@@ -717,7 +718,7 @@ start_journal_io:
|
||||
clear_buffer_dirty(bh);
|
||||
set_buffer_uptodate(bh);
|
||||
bh->b_end_io = journal_end_buffer_io_sync;
|
||||
submit_bh(REQ_OP_WRITE, WRITE_SYNC, bh);
|
||||
submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
|
||||
}
|
||||
cond_resched();
|
||||
stats.run.rs_blocks_logged += bufs;
|
||||
|
Reference in New Issue
Block a user