From f29372322e415999f429d3e3883b865c87860b46 Mon Sep 17 00:00:00 2001 From: Hans Holmberg Date: Tue, 9 Oct 2018 13:11:53 +0200 Subject: lightnvm: pblk: add trace events for line state changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add trace events for logging for line state changes. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- drivers/lightnvm/pblk-recovery.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/lightnvm/pblk-recovery.c') diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c index cbcc0828517e..0322ab915ddc 100644 --- a/drivers/lightnvm/pblk-recovery.c +++ b/drivers/lightnvm/pblk-recovery.c @@ -15,6 +15,7 @@ */ #include "pblk.h" +#include "pblk-trace.h" int pblk_recov_check_emeta(struct pblk *pblk, struct line_emeta *emeta_buf) { @@ -932,6 +933,8 @@ next: spin_lock(&line->lock); line->state = PBLK_LINESTATE_CLOSED; + trace_pblk_line_state(pblk_disk_name(pblk), line->id, + line->state); move_list = pblk_line_gc_list(pblk, line); spin_unlock(&line->lock); @@ -947,6 +950,9 @@ next: if (open_lines > 1) pblk_err(pblk, "failed to recover L2P\n"); + trace_pblk_line_state(pblk_disk_name(pblk), line->id, + line->state); + open_lines++; line->meta_line = meta_line; data_line = line; -- cgit v1.2.3