2.6.28-stable review patch. If anyone has any objections, please let us know.

------------------From: Jonathan Brassow <jbrassow@redhat.com>

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 alternativemirror leg. If the target doesn't use the "handle_errors" feature, theerror count is not updated and the bio can get requeued forever by theread callback.

Fix it by increasing error_count before the handle_errors featurechecking.

- if (!errors_handled(ms))- return;- /* * error_count is used for nothing more than a * simple way to tell if a device has encountered@@ -210,6 +207,9 @@ static void fail_mirror(struct mirror *m if (test_and_set_bit(error_type, &m->error_type)) return;