diff --git a/kernel/fs/jbd2/journal.c b/kernel/fs/jbd2/journal.c index be6f717..7c7a33c 100644 --- a/kernel/fs/jbd2/journal.c +++ b/kernel/fs/jbd2/journal.c @@ -1329,10 +1329,17 @@ static int journal_reset(journal_t *journal) * must make sure information about current log tail is on * disk before that. */ +#if 1 + jbd2_journal_update_sb_log_tail(journal, + journal->j_tail_sequence, + journal->j_tail, + WRITE); +#else jbd2_journal_update_sb_log_tail(journal, journal->j_tail_sequence, journal->j_tail, WRITE_FUA); +#endif mutex_unlock(&journal->j_checkpoint_mutex); } return jbd2_journal_start_thread(journal); diff --git a/kernel/fs/jbd2/recovery.c b/kernel/fs/jbd2/recovery.c index a5f72a3..503cc49 100644 --- a/kernel/fs/jbd2/recovery.c +++ b/kernel/fs/jbd2/recovery.c @@ -23,6 +23,9 @@ #include #include #endif +#if 1 +#include "../internal.h" +#endif /* * Maintain information about the progress of the recovery job, so that @@ -285,7 +288,11 @@ int jbd2_journal_recover(journal_t *journal) journal->j_transaction_sequence = ++info.end_transaction; jbd2_journal_clear_revoke(journal); +#if 1 + err2 = __sync_blockdev(journal->j_fs_dev, 0); +#else err2 = sync_blockdev(journal->j_fs_dev); +#endif if (!err) err = err2; /* Make sure all replayed data is on permanent storage */