mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
jbd2: Fix statistics for the number of logged blocks
[ Upstream commit 015c6033068208d6227612c878877919f3fcf6b6 ] jbd2 statistics counting number of blocks logged in a transaction was wrong. It didn't count the commit block and more importantly it didn't count revoke descriptor blocks. Make sure these get properly counted. Reviewed-by: Theodore Ts'o <[email protected]> Signed-off-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
e48a603448
commit
9e2946bddd
1 changed files with 3 additions and 1 deletions
|
|
@ -727,7 +727,6 @@ start_journal_io:
|
|||
submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
|
||||
}
|
||||
cond_resched();
|
||||
stats.run.rs_blocks_logged += bufs;
|
||||
|
||||
/* Force a new descriptor to be generated next
|
||||
time round the loop. */
|
||||
|
|
@ -814,6 +813,7 @@ start_journal_io:
|
|||
if (unlikely(!buffer_uptodate(bh)))
|
||||
err = -EIO;
|
||||
jbd2_unfile_log_bh(bh);
|
||||
stats.run.rs_blocks_logged++;
|
||||
|
||||
/*
|
||||
* The list contains temporary buffer heads created by
|
||||
|
|
@ -859,6 +859,7 @@ start_journal_io:
|
|||
BUFFER_TRACE(bh, "ph5: control buffer writeout done: unfile");
|
||||
clear_buffer_jwrite(bh);
|
||||
jbd2_unfile_log_bh(bh);
|
||||
stats.run.rs_blocks_logged++;
|
||||
__brelse(bh); /* One for getblk */
|
||||
/* AKPM: bforget here */
|
||||
}
|
||||
|
|
@ -880,6 +881,7 @@ start_journal_io:
|
|||
}
|
||||
if (cbh)
|
||||
err = journal_wait_on_commit_record(journal, cbh);
|
||||
stats.run.rs_blocks_logged++;
|
||||
if (jbd2_has_feature_async_commit(journal) &&
|
||||
journal->j_flags & JBD2_BARRIER) {
|
||||
blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue