]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid1: fix error count
authorJonathan Brassow <jbrassow@redhat.com>
Tue, 6 Jan 2009 03:04:57 +0000 (03:04 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 6 Jan 2009 03:04:57 +0000 (03:04 +0000)
commit877b644de3829b047dceb3d055345c027d2a76be
tree84131d888f5ec610cc343ca7188a5d4044043c2b
parentd67d0687c00fab97e431b8b0838b19a98c0fcaec
dm raid1: fix error count

Always increase the error count when I/O on a leg of a mirror fails.

The error count is used to decide whether to select an alternative
mirror leg.  If the target doesn't use the "handle_errors" feature, the
error count is not updated and the bio can get requeued forever by the
read callback.

Fix it by increasing error_count before the handle_errors feature
checking.

Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid1.c