提交 8f554597 编写于 作者: J Javier González 提交者: Jens Axboe

lightnvm: pblk: do not log recovery read errors

On scan recovery, reads can fail. This happens because the first page
for each line is read in order to determined if the line has been used
(and thus needs to be recovered), or not. This can lead to "empty page"
read errors.

Since these errors are normal, do not log them, as they are confusing
when reviewing the logs.
Signed-off-by: NJavier González <javier@cnexlabs.com>
Signed-off-by: NMatias Bjørling <m@bjorling.me>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 5d201f07
...@@ -742,7 +742,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line, ...@@ -742,7 +742,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line,
cmd_op = NVM_OP_PWRITE; cmd_op = NVM_OP_PWRITE;
flags = pblk_set_progr_mode(pblk, PBLK_WRITE); flags = pblk_set_progr_mode(pblk, PBLK_WRITE);
lba_list = emeta_to_lbas(pblk, line->emeta->buf); lba_list = emeta_to_lbas(pblk, line->emeta->buf);
} else if (dir == PBLK_READ) { } else if (dir == PBLK_READ_RECOV || dir == PBLK_READ) {
bio_op = REQ_OP_READ; bio_op = REQ_OP_READ;
cmd_op = NVM_OP_PREAD; cmd_op = NVM_OP_PREAD;
flags = pblk_set_read_mode(pblk, PBLK_READ_SEQUENTIAL); flags = pblk_set_read_mode(pblk, PBLK_READ_SEQUENTIAL);
...@@ -802,7 +802,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line, ...@@ -802,7 +802,7 @@ static int pblk_line_submit_smeta_io(struct pblk *pblk, struct pblk_line *line,
if (rqd.error) { if (rqd.error) {
if (dir == PBLK_WRITE) if (dir == PBLK_WRITE)
pblk_log_write_err(pblk, &rqd); pblk_log_write_err(pblk, &rqd);
else else if (dir == PBLK_READ)
pblk_log_read_err(pblk, &rqd); pblk_log_read_err(pblk, &rqd);
} }
...@@ -816,7 +816,7 @@ int pblk_line_read_smeta(struct pblk *pblk, struct pblk_line *line) ...@@ -816,7 +816,7 @@ int pblk_line_read_smeta(struct pblk *pblk, struct pblk_line *line)
{ {
u64 bpaddr = pblk_line_smeta_start(pblk, line); u64 bpaddr = pblk_line_smeta_start(pblk, line);
return pblk_line_submit_smeta_io(pblk, line, bpaddr, PBLK_READ); return pblk_line_submit_smeta_io(pblk, line, bpaddr, PBLK_READ_RECOV);
} }
int pblk_line_read_emeta(struct pblk *pblk, struct pblk_line *line, int pblk_line_read_emeta(struct pblk *pblk, struct pblk_line *line,
......
...@@ -60,6 +60,7 @@ enum { ...@@ -60,6 +60,7 @@ enum {
PBLK_READ = READ, PBLK_READ = READ,
PBLK_WRITE = WRITE,/* Write from write buffer */ PBLK_WRITE = WRITE,/* Write from write buffer */
PBLK_WRITE_INT, /* Internal write - no write buffer */ PBLK_WRITE_INT, /* Internal write - no write buffer */
PBLK_READ_RECOV, /* Recovery read - errors allowed */
PBLK_ERASE, PBLK_ERASE,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册