From 307729c8bc5b5a41361af8af95906eee7552acb1 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 9 Jan 2012 01:41:51 +1100 Subject: [PATCH] md/raid1: perform bad-block tests for WriteMostly devices too. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We normally try to avoid reading from write-mostly devices, but when we do we really have to check for bad blocks and be sure not to try reading them. With the current code, best_good_sectors might not get set and that causes zero-length read requests to be send down which is very confusing. This bug was introduced in commit d2eb35acfdccbe2 and so the patch is suitable for 3.1.x and 3.2.x Reported-and-tested-by: Michał Mirosław Reported-and-tested-by: Art -kwaak- van Breemen Signed-off-by: NeilBrown Cc: stable@vger.kernel.org --- Reading git-format-patch failed