lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe58efbf-a859-e9a3-ba86-ed86232cc51f@coly.li>
Date:   Sat, 13 Jan 2018 11:40:54 +0800
From:   Coly Li <i@...y.li>
To:     Pavel Vazharov <freakpv@...il.com>, mlyle@...e.org,
        kent.overstreet@...il.com
Cc:     linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bcache: io.c: Fix check against error_limit in case of io
 errors

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ