From: Pavel Vazharov <freakpv@gmail.com>
To: mlyle@lyle.org, kent.overstreet@gmail.com
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
Pavel Vazharov <freakpv@gmail.com>
Subject: [PATCH] bcache: io.c: Fix check against error_limit in case of io errors
Date: Fri, 12 Jan 2018 16:07:31 +0200 [thread overview]
Message-ID: <1515766051-13380-1-git-send-email-freakpv@gmail.com> (raw)
The actual sysfs io_error_limit value is left shifted IO_ERROR_SHIFT
times before it is stored in the error_limit.
This fixes the un-registering of the cache set when the io_errors reach
the error_limit value.
Signed-off-by: Pavel Vazharov <freakpv@gmail.com>
---
drivers/md/bcache/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index fac97ec..1ef6ae2 100644
--- a/drivers/md/bcache/io.c
+++ b/drivers/md/bcache/io.c
@@ -93,7 +93,7 @@ void bch_count_io_errors(struct cache *ca, blk_status_t error, const char *m)
&ca->io_errors);
errors >>= IO_ERROR_SHIFT;
- if (errors < ca->set->error_limit)
+ if (errors < (ca->set->error_limit >> IO_ERROR_SHIFT))
pr_err("%s: IO error on %s, recovering",
bdevname(ca->bdev, buf), m);
else
--
2.7.4
next reply other threads:[~2018-01-12 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 14:07 Pavel Vazharov [this message]
2018-01-13 3:40 ` [PATCH] bcache: io.c: Fix check against error_limit in case of io errors Coly Li
2018-01-13 4:22 ` Pavel Vazharov
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=1515766051-13380-1-git-send-email-freakpv@gmail.com \
--to=freakpv@gmail.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlyle@lyle.org \
/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