From: Igor Konopko <igor.j.konopko@intel.com>
To: mb@lightnvm.io, javier@javigon.com, hans.holmberg@cnexlabs.com
Cc: linux-block@vger.kernel.org, igor.j.konopko@intel.com
Subject: [PATCH v2 3/8] lightnvm: pblk: Count all read errors in stats
Date: Tue, 5 Mar 2019 14:51:15 +0100 [thread overview]
Message-ID: <20190305135120.29284-4-igor.j.konopko@intel.com> (raw)
In-Reply-To: <20190305135120.29284-1-igor.j.konopko@intel.com>
Currently when unknown error occurs on read path there is only dmesg
information about it, but it is not counted in sysfs statistics.
We would also like to track the number of such a requests, so new type
of counter 'read_ctrl_errors" is added in that patch.
Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
---
drivers/lightnvm/pblk-core.c | 1 +
drivers/lightnvm/pblk-init.c | 1 +
drivers/lightnvm/pblk-sysfs.c | 3 ++-
drivers/lightnvm/pblk.h | 1 +
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 39280c1..64280e6 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -493,6 +493,7 @@ void pblk_log_read_err(struct pblk *pblk, struct nvm_rq *rqd)
atomic_long_inc(&pblk->read_failed);
break;
default:
+ atomic_long_inc(&pblk->read_ctrl_errors);
pblk_err(pblk, "unknown read error:%d\n", rqd->error);
}
#ifdef CONFIG_NVM_PBLK_DEBUG
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 81e8ed4..f4b6d8f2 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -1230,6 +1230,7 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
atomic_long_set(&pblk->read_empty, 0);
atomic_long_set(&pblk->read_high_ecc, 0);
atomic_long_set(&pblk->read_failed_gc, 0);
+ atomic_long_set(&pblk->read_ctrl_errors, 0);
atomic_long_set(&pblk->write_failed, 0);
atomic_long_set(&pblk->erase_failed, 0);
diff --git a/drivers/lightnvm/pblk-sysfs.c b/drivers/lightnvm/pblk-sysfs.c
index 7d8958d..922273c 100644
--- a/drivers/lightnvm/pblk-sysfs.c
+++ b/drivers/lightnvm/pblk-sysfs.c
@@ -94,11 +94,12 @@ static ssize_t pblk_sysfs_stats(struct pblk *pblk, char *page)
ssize_t sz;
sz = snprintf(page, PAGE_SIZE,
- "read_failed=%lu, read_high_ecc=%lu, read_empty=%lu, read_failed_gc=%lu, write_failed=%lu, erase_failed=%lu\n",
+ "read_failed=%lu, read_high_ecc=%lu, read_empty=%lu, read_failed_gc=%lu, read_ctrl_errors=%lu, write_failed=%lu, erase_failed=%lu\n",
atomic_long_read(&pblk->read_failed),
atomic_long_read(&pblk->read_high_ecc),
atomic_long_read(&pblk->read_empty),
atomic_long_read(&pblk->read_failed_gc),
+ atomic_long_read(&pblk->read_ctrl_errors),
atomic_long_read(&pblk->write_failed),
atomic_long_read(&pblk->erase_failed));
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index 381f074..6c82776 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -684,6 +684,7 @@ struct pblk {
atomic_long_t read_empty;
atomic_long_t read_high_ecc;
atomic_long_t read_failed_gc;
+ atomic_long_t read_ctrl_errors;
atomic_long_t write_failed;
atomic_long_t erase_failed;
--
2.9.5
next prev parent reply other threads:[~2019-03-05 13:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 13:51 [PATCH v2 0/8] lightnvm: bugfixes and improvements Igor Konopko
2019-03-05 13:51 ` [PATCH v2 1/8] lightnvm: pblk: Gracefully handle GC vmalloc fail Igor Konopko
2019-03-06 14:09 ` Hans Holmberg
2019-03-05 13:51 ` [PATCH v2 2/8] lightnvm: pblk: Fix put line back behaviour Igor Konopko
2019-03-05 13:51 ` Igor Konopko [this message]
2019-03-06 7:28 ` [PATCH v2 3/8] lightnvm: pblk: Count all read errors in stats Javier González
2019-03-06 14:19 ` Hans Holmberg
2019-03-06 14:22 ` Igor Konopko
2019-03-05 13:51 ` [PATCH v2 4/8] lightnvm: pblk: Ensure that erase is chunk aligned Igor Konopko
2019-03-06 7:28 ` Javier González
2019-03-06 14:20 ` Hans Holmberg
2019-03-05 13:51 ` [PATCH v2 5/8] lightnvm: pblk: Cleanly fail when there is not enough memory Igor Konopko
2019-03-06 14:20 ` Hans Holmberg
2019-03-05 13:51 ` [PATCH v2 6/8] lightnvm: pblk: Set proper read stutus in bio Igor Konopko
2019-03-06 8:00 ` Javier González
2019-03-06 14:23 ` Hans Holmberg
2019-03-05 13:51 ` [PATCH v2 7/8] lightnvm: pblk: warn about opened chunk on factory init Igor Konopko
2019-03-06 7:43 ` Javier González
2019-03-06 14:27 ` Hans Holmberg
2019-03-06 14:31 ` Igor Konopko
2019-03-05 13:51 ` [PATCH v2 8/8] lightnvm: Inherit mdts from the parent nvme device Igor Konopko
2019-03-05 14:34 ` Matias Bjørling
2019-03-06 7:44 ` Javier González
2019-03-06 14:29 ` Hans Holmberg
2019-03-09 16:56 ` [PATCH v2 0/8] lightnvm: bugfixes and improvements Matias Bjørling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190305135120.29284-4-igor.j.konopko@intel.com \
--to=igor.j.konopko@intel.com \
--cc=hans.holmberg@cnexlabs.com \
--cc=javier@javigon.com \
--cc=linux-block@vger.kernel.org \
--cc=mb@lightnvm.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox