diff options
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 2d5095ecc25f..5b506e53c70b 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -677,6 +677,10 @@ start_journal_io: | |||
| 677 | err = 0; | 677 | err = 0; |
| 678 | } | 678 | } |
| 679 | 679 | ||
| 680 | write_lock(&journal->j_state_lock); | ||
| 681 | J_ASSERT(commit_transaction->t_state == T_COMMIT); | ||
| 682 | commit_transaction->t_state = T_COMMIT_DFLUSH; | ||
| 683 | write_unlock(&journal->j_state_lock); | ||
| 680 | /* | 684 | /* |
| 681 | * If the journal is not located on the file system device, | 685 | * If the journal is not located on the file system device, |
| 682 | * then we must flush the file system device before we issue | 686 | * then we must flush the file system device before we issue |
| @@ -804,6 +808,10 @@ wait_for_iobuf: | |||
| 804 | jbd2_journal_abort(journal, err); | 808 | jbd2_journal_abort(journal, err); |
| 805 | 809 | ||
| 806 | jbd_debug(3, "JBD: commit phase 5\n"); | 810 | jbd_debug(3, "JBD: commit phase 5\n"); |
| 811 | write_lock(&journal->j_state_lock); | ||
| 812 | J_ASSERT(commit_transaction->t_state == T_COMMIT_DFLUSH); | ||
| 813 | commit_transaction->t_state = T_COMMIT_JFLUSH; | ||
| 814 | write_unlock(&journal->j_state_lock); | ||
| 807 | 815 | ||
| 808 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, | 816 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, |
| 809 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) { | 817 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) { |
| @@ -959,7 +967,7 @@ restart_loop: | |||
| 959 | 967 | ||
| 960 | jbd_debug(3, "JBD: commit phase 7\n"); | 968 | jbd_debug(3, "JBD: commit phase 7\n"); |
| 961 | 969 | ||
| 962 | J_ASSERT(commit_transaction->t_state == T_COMMIT); | 970 | J_ASSERT(commit_transaction->t_state == T_COMMIT_JFLUSH); |
| 963 | 971 | ||
| 964 | commit_transaction->t_start = jiffies; | 972 | commit_transaction->t_start = jiffies; |
| 965 | stats.run.rs_logging = jbd2_time_diff(stats.run.rs_logging, | 973 | stats.run.rs_logging = jbd2_time_diff(stats.run.rs_logging, |
