]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: restore ability for check and repair to fix read errors.
authorNeilBrown <neilb@suse.de>
Wed, 5 Feb 2014 01:17:01 +0000 (12:17 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 5 Feb 2014 01:26:04 +0000 (12:26 +1100)
commit3c2808cea71e964836ffbb1b9588e07109de0b1a
treed0ceba265729a42c5b08cb510440c875bd009968
parented4c0e42e851d5178cd0d1dc05de408325576e1c
md/raid1: restore ability for check and repair to fix read errors.

commit aaacc5eff3d4ad08ba8f12549307ae20f8926efa
    md/raid1: fix bio handling problems in process_checks()

Move the bio_reset() to a point before where BIO_UPTODATE is checked,
so that check now always report that the bio is uptodate, even if it is not.

This causes process_check() to sometimes treat read-errors as
successful matches so the good data isn't written out.

This patch preserves the flag until it is needed.

Bug was introduced in 3.11, but backported to 3.10-stable (as it fixed
an even worse bug).  So suitable for any -stable since 3.10.

Reported-and-tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: stable@vger.kernel.org (3.10+)
Fixed: aaacc5eff3d4ad08ba8f12549307ae20f8926efa
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c