Merge patch series "jbd2: two straightforward fixes"

Two simple fixes for jdb2.

* patches from https://lore.kernel.org/r/20241203014407.805916-1-yi.zhang@huaweicloud.com:
  jbd2: flush filesystem device before updating tail sequence
  jbd2: increase IO priority for writing revoke records

Link: https://lore.kernel.org/r/20241203014407.805916-1-yi.zhang@huaweicloud.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2024-12-04 12:00:12 +01:00
commit 930e7c209b
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
2 changed files with 3 additions and 3 deletions

View File

@ -772,9 +772,9 @@ void jbd2_journal_commit_transaction(journal_t *journal)
/*
* If the journal is not located on the file system device,
* then we must flush the file system device before we issue
* the commit record
* the commit record and update the journal tail sequence.
*/
if (commit_transaction->t_need_data_flush &&
if ((commit_transaction->t_need_data_flush || update_tail) &&
(journal->j_fs_dev != journal->j_dev) &&
(journal->j_flags & JBD2_BARRIER))
blkdev_issue_flush(journal->j_fs_dev);

View File

@ -654,7 +654,7 @@ static void flush_descriptor(journal_t *journal,
set_buffer_jwrite(descriptor);
BUFFER_TRACE(descriptor, "write");
set_buffer_dirty(descriptor);
write_dirty_buffer(descriptor, REQ_SYNC);
write_dirty_buffer(descriptor, JBD2_JOURNAL_REQ_FLAGS);
}
#endif