|
@@ -944,7 +944,7 @@ out:
|
|
*/
|
|
*/
|
|
void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block)
|
|
void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block)
|
|
{
|
|
{
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
if (tid_gt(tid, journal->j_tail_sequence))
|
|
if (tid_gt(tid, journal->j_tail_sequence))
|
|
__jbd2_update_log_tail(journal, tid, block);
|
|
__jbd2_update_log_tail(journal, tid, block);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
@@ -1304,7 +1304,7 @@ static int journal_reset(journal_t *journal)
|
|
journal->j_flags |= JBD2_FLUSHED;
|
|
journal->j_flags |= JBD2_FLUSHED;
|
|
} else {
|
|
} else {
|
|
/* Lock here to make assertions happy... */
|
|
/* Lock here to make assertions happy... */
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
/*
|
|
/*
|
|
* Update log tail information. We use REQ_FUA since new
|
|
* Update log tail information. We use REQ_FUA since new
|
|
* transaction will start reusing journal space and so we
|
|
* transaction will start reusing journal space and so we
|
|
@@ -1691,7 +1691,7 @@ int jbd2_journal_destroy(journal_t *journal)
|
|
spin_lock(&journal->j_list_lock);
|
|
spin_lock(&journal->j_list_lock);
|
|
while (journal->j_checkpoint_transactions != NULL) {
|
|
while (journal->j_checkpoint_transactions != NULL) {
|
|
spin_unlock(&journal->j_list_lock);
|
|
spin_unlock(&journal->j_list_lock);
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
err = jbd2_log_do_checkpoint(journal);
|
|
err = jbd2_log_do_checkpoint(journal);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
/*
|
|
/*
|
|
@@ -1713,7 +1713,7 @@ int jbd2_journal_destroy(journal_t *journal)
|
|
|
|
|
|
if (journal->j_sb_buffer) {
|
|
if (journal->j_sb_buffer) {
|
|
if (!is_journal_aborted(journal)) {
|
|
if (!is_journal_aborted(journal)) {
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
write_lock(&journal->j_state_lock);
|
|
write_lock(&journal->j_state_lock);
|
|
journal->j_tail_sequence =
|
|
journal->j_tail_sequence =
|
|
@@ -1955,7 +1955,7 @@ int jbd2_journal_flush(journal_t *journal)
|
|
spin_lock(&journal->j_list_lock);
|
|
spin_lock(&journal->j_list_lock);
|
|
while (!err && journal->j_checkpoint_transactions != NULL) {
|
|
while (!err && journal->j_checkpoint_transactions != NULL) {
|
|
spin_unlock(&journal->j_list_lock);
|
|
spin_unlock(&journal->j_list_lock);
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
err = jbd2_log_do_checkpoint(journal);
|
|
err = jbd2_log_do_checkpoint(journal);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
mutex_unlock(&journal->j_checkpoint_mutex);
|
|
spin_lock(&journal->j_list_lock);
|
|
spin_lock(&journal->j_list_lock);
|
|
@@ -1965,7 +1965,7 @@ int jbd2_journal_flush(journal_t *journal)
|
|
if (is_journal_aborted(journal))
|
|
if (is_journal_aborted(journal))
|
|
return -EIO;
|
|
return -EIO;
|
|
|
|
|
|
- mutex_lock(&journal->j_checkpoint_mutex);
|
|
|
|
|
|
+ mutex_lock_io(&journal->j_checkpoint_mutex);
|
|
if (!err) {
|
|
if (!err) {
|
|
err = jbd2_cleanup_journal_tail(journal);
|
|
err = jbd2_cleanup_journal_tail(journal);
|
|
if (err < 0) {
|
|
if (err < 0) {
|