Commit 77650bdb authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

gfs2: add missing log_blocks trace points in gfs2_write_revokes

Function gfs2_write_revokes was incrementing and decrementing the number
of log blocks free, but there was never a log_blocks trace point for it.
Thus, the free blocks from a log_blocks trace would jump around
mysteriously.

This patch adds the missing trace points so the trace makes more sense.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 21b6924b
......@@ -716,16 +716,24 @@ void gfs2_write_revokes(struct gfs2_sbd *sdp)
atomic_dec(&sdp->sd_log_blks_free);
/* If no blocks have been reserved, we need to also
* reserve a block for the header */
if (!sdp->sd_log_blks_reserved)
if (!sdp->sd_log_blks_reserved) {
atomic_dec(&sdp->sd_log_blks_free);
trace_gfs2_log_blocks(sdp, -2);
} else {
trace_gfs2_log_blocks(sdp, -1);
}
}
gfs2_ail1_empty(sdp, max_revokes);
gfs2_log_unlock(sdp);
if (!sdp->sd_log_num_revoke) {
atomic_inc(&sdp->sd_log_blks_free);
if (!sdp->sd_log_blks_reserved)
if (!sdp->sd_log_blks_reserved) {
atomic_inc(&sdp->sd_log_blks_free);
trace_gfs2_log_blocks(sdp, 2);
} else {
trace_gfs2_log_blocks(sdp, 1);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment