[PATCH] bcache: io.c: Fix check against error_limit in case of io errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux