diff options
| author | Xin Yin <[email protected]> | 2022-01-17 09:36:54 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2022-02-03 15:56:39 +0000 |
| commit | e85c81ba8859a4c839bcd69c5d83b32954133a5b (patch) | |
| tree | 82c221700beddb5bd5173b9dc825b91e766e4133 /fs/jbd2/commit.c | |
| parent | ext4: modify the logic of ext4_mb_new_blocks_simple (diff) | |
| download | kernel-e85c81ba8859a4c839bcd69c5d83b32954133a5b.tar.gz kernel-e85c81ba8859a4c839bcd69c5d83b32954133a5b.zip | |
ext4: fast commit may not fallback for ineligible commit
For the follow scenario:
1. jbd start commit transaction n
2. task A get new handle for transaction n+1
3. task A do some ineligible actions and mark FC_INELIGIBLE
4. jbd complete transaction n and clean FC_INELIGIBLE
5. task A call fsync
In this case fast commit will not fallback to full commit and
transaction n+1 also not handled by jbd.
Make ext4_fc_mark_ineligible() also record transaction tid for
latest ineligible case, when call ext4_fc_cleanup() check
current transaction tid, if small than latest ineligible tid
do not clear the EXT4_MF_FC_INELIGIBLE.
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Reported-by: Ritesh Harjani <[email protected]>
Suggested-by: Harshad Shirwadkar <[email protected]>
Signed-off-by: Xin Yin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Cc: [email protected]
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 3cc4ab2ba7f4..d188fa913a07 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -1170,7 +1170,7 @@ restart_loop: if (journal->j_commit_callback) journal->j_commit_callback(journal, commit_transaction); if (journal->j_fc_cleanup_callback) - journal->j_fc_cleanup_callback(journal, 1); + journal->j_fc_cleanup_callback(journal, 1, commit_transaction->t_tid); trace_jbd2_end_commit(journal, commit_transaction); jbd_debug(1, "JBD2: commit %d complete, head %d\n", |
