diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-01 09:40:10 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-01 11:43:26 -0400 |
commit | 70fd76140a6cb63262bd47b68d57b42e889c10ee (patch) | |
tree | 0590b2ef1b89b6af6abb8da9d23d5d87991d74c8 /fs/jbd2/journal.c | |
parent | a2b809672ee6fcb4d5756ea815725b3dbaea654e (diff) |
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>
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r-- | fs/jbd2/journal.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 927da4956a89..8ed971eeab44 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -913,7 +913,7 @@ int __jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block) | |||
913 | * space and if we lose sb update during power failure we'd replay | 913 | * space and if we lose sb update during power failure we'd replay |
914 | * old transaction with possibly newly overwritten data. | 914 | * old transaction with possibly newly overwritten data. |
915 | */ | 915 | */ |
916 | ret = jbd2_journal_update_sb_log_tail(journal, tid, block, WRITE_FUA); | 916 | ret = jbd2_journal_update_sb_log_tail(journal, tid, block, REQ_FUA); |
917 | if (ret) | 917 | if (ret) |
918 | goto out; | 918 | goto out; |
919 | 919 | ||
@@ -1306,7 +1306,7 @@ static int journal_reset(journal_t *journal) | |||
1306 | /* Lock here to make assertions happy... */ | 1306 | /* Lock here to make assertions happy... */ |
1307 | mutex_lock(&journal->j_checkpoint_mutex); | 1307 | mutex_lock(&journal->j_checkpoint_mutex); |
1308 | /* | 1308 | /* |
1309 | * Update log tail information. We use WRITE_FUA since new | 1309 | * Update log tail information. We use REQ_FUA since new |
1310 | * transaction will start reusing journal space and so we | 1310 | * transaction will start reusing journal space and so we |
1311 | * must make sure information about current log tail is on | 1311 | * must make sure information about current log tail is on |
1312 | * disk before that. | 1312 | * disk before that. |
@@ -1314,7 +1314,7 @@ static int journal_reset(journal_t *journal) | |||
1314 | jbd2_journal_update_sb_log_tail(journal, | 1314 | jbd2_journal_update_sb_log_tail(journal, |
1315 | journal->j_tail_sequence, | 1315 | journal->j_tail_sequence, |
1316 | journal->j_tail, | 1316 | journal->j_tail, |
1317 | WRITE_FUA); | 1317 | REQ_FUA); |
1318 | mutex_unlock(&journal->j_checkpoint_mutex); | 1318 | mutex_unlock(&journal->j_checkpoint_mutex); |
1319 | } | 1319 | } |
1320 | return jbd2_journal_start_thread(journal); | 1320 | return jbd2_journal_start_thread(journal); |
@@ -1454,7 +1454,7 @@ void jbd2_journal_update_sb_errno(journal_t *journal) | |||
1454 | sb->s_errno = cpu_to_be32(journal->j_errno); | 1454 | sb->s_errno = cpu_to_be32(journal->j_errno); |
1455 | read_unlock(&journal->j_state_lock); | 1455 | read_unlock(&journal->j_state_lock); |
1456 | 1456 | ||
1457 | jbd2_write_superblock(journal, WRITE_FUA); | 1457 | jbd2_write_superblock(journal, REQ_FUA); |
1458 | } | 1458 | } |
1459 | EXPORT_SYMBOL(jbd2_journal_update_sb_errno); | 1459 | EXPORT_SYMBOL(jbd2_journal_update_sb_errno); |
1460 | 1460 | ||
@@ -1720,7 +1720,8 @@ int jbd2_journal_destroy(journal_t *journal) | |||
1720 | ++journal->j_transaction_sequence; | 1720 | ++journal->j_transaction_sequence; |
1721 | write_unlock(&journal->j_state_lock); | 1721 | write_unlock(&journal->j_state_lock); |
1722 | 1722 | ||
1723 | jbd2_mark_journal_empty(journal, WRITE_FLUSH_FUA); | 1723 | jbd2_mark_journal_empty(journal, |
1724 | REQ_PREFLUSH | REQ_FUA); | ||
1724 | mutex_unlock(&journal->j_checkpoint_mutex); | 1725 | mutex_unlock(&journal->j_checkpoint_mutex); |
1725 | } else | 1726 | } else |
1726 | err = -EIO; | 1727 | err = -EIO; |
@@ -1979,7 +1980,7 @@ int jbd2_journal_flush(journal_t *journal) | |||
1979 | * the magic code for a fully-recovered superblock. Any future | 1980 | * the magic code for a fully-recovered superblock. Any future |
1980 | * commits of data to the journal will restore the current | 1981 | * commits of data to the journal will restore the current |
1981 | * s_start value. */ | 1982 | * s_start value. */ |
1982 | jbd2_mark_journal_empty(journal, WRITE_FUA); | 1983 | jbd2_mark_journal_empty(journal, REQ_FUA); |
1983 | mutex_unlock(&journal->j_checkpoint_mutex); | 1984 | mutex_unlock(&journal->j_checkpoint_mutex); |
1984 | write_lock(&journal->j_state_lock); | 1985 | write_lock(&journal->j_state_lock); |
1985 | J_ASSERT(!journal->j_running_transaction); | 1986 | J_ASSERT(!journal->j_running_transaction); |
@@ -2025,7 +2026,7 @@ int jbd2_journal_wipe(journal_t *journal, int write) | |||
2025 | if (write) { | 2026 | if (write) { |
2026 | /* Lock to make assertions happy... */ | 2027 | /* Lock to make assertions happy... */ |
2027 | mutex_lock(&journal->j_checkpoint_mutex); | 2028 | mutex_lock(&journal->j_checkpoint_mutex); |
2028 | jbd2_mark_journal_empty(journal, WRITE_FUA); | 2029 | jbd2_mark_journal_empty(journal, REQ_FUA); |
2029 | mutex_unlock(&journal->j_checkpoint_mutex); | 2030 | mutex_unlock(&journal->j_checkpoint_mutex); |
2030 | } | 2031 | } |
2031 | 2032 | ||