From: Coly Li <i@coly.li>
To: Pavel Vazharov <freakpv@gmail.com>,
mlyle@lyle.org, kent.overstreet@gmail.com
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcache: io.c: Fix check against error_limit in case of io errors
Date: Sat, 13 Jan 2018 11:40:54 +0800 [thread overview]
Message-ID: <fe58efbf-a859-e9a3-ba86-ed86232cc51f@coly.li> (raw)
In-Reply-To: <1515766051-13380-1-git-send-email-freakpv@gmail.com>
On 12/01/2018 10:07 PM, Pavel Vazharov wrote:
> 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
>
Hi Pavel,
A similar fix is also in my device failure patch set, its name is,
bcache: set error_limit correctly
The difference is, I remove the bit shift of error_limit.
--
Coly Li
next prev parent reply other threads:[~2018-01-13 3:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 14:07 [PATCH] bcache: io.c: Fix check against error_limit in case of io errors Pavel Vazharov
2018-01-13 3:40 ` Coly Li [this message]
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=fe58efbf-a859-e9a3-ba86-ed86232cc51f@coly.li \
--to=i@coly.li \
--cc=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