]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm raid1: fix error count
authorJonathan Brassow <jbrassow@redhat.com>
Tue, 6 Jan 2009 03:04:57 +0000 (03:04 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 18 Jan 2009 18:43:46 +0000 (10:43 -0800)
commit1d2f14fd4e53264f47344869a2321f79b6372feb
tree2f498dfb3c40ea81f567ab6630bda2269e46876c
parentc215a7c4d008120fb13d1e80fe312208d72f01ba
dm raid1: fix error count

commit d460c65a6a9ec9e0d284864ec3a9a2d1b73f0e43 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-raid1.c