summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/pblk-recovery.c
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@cnexlabs.com>2018-10-09 14:11:53 +0300
committerJens Axboe <axboe@kernel.dk>2018-10-09 17:25:07 +0300
commitf29372322e415999f429d3e3883b865c87860b46 (patch)
treea4f2da7c649d36b6f36d59e534da1d93b0a065bb /drivers/lightnvm/pblk-recovery.c
parent4c44abf43d00d81f5c648f376c436a9405980efc (diff)
downloadlinux-f29372322e415999f429d3e3883b865c87860b46.tar.xz
lightnvm: pblk: add trace events for line state changes
Add trace events for logging for line state changes. Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-recovery.c')
-rw-r--r--drivers/lightnvm/pblk-recovery.c6
1 files changed, 6 insertions, 0 deletions
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;