]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
dm mirror: fix read error on recovery after default leg failure
authorHeinz Mauelshagen <heinzm@redhat.com>
Mon, 10 Oct 2016 15:58:32 +0000 (17:58 +0200)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:51:51 +0000 (16:51 +0000)
commit0599932001cb3e2f4d404cc0a50c9fca9516cd37
tree9f77e6c1e8f514296f72d433e73fe4f65548e3b2
parent19330c989b5ea488ade8deaafe4b7d7574668edf
dm mirror: fix read error on recovery after default leg failure

BugLink: http://bugs.launchpad.net/bugs/1642572
commit dcb2ff56417362c31f6b430c3c531a84581e8721 upstream.

If a default leg has failed, any read will cause a new operational
default leg to be selected and the read is resubmitted.  But until now
the read will return failure even though it was successful due to
resubmission.  The reason for this is bio->bi_error was not being
cleared before resubmitting the bio.

Fix by clearing bio->bi_error before resubmission.

Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio")
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/md/dm-raid1.c