This is a note to let you know that I've just added the patch titled md/raid1: fix_read_error should act on all non-faulty devices. to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: md-raid1-fix_read_error-should-act-on-all-non-faulty-devices.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b8cb6b4c121e1bf1963c16ed69e7adcb1bc301cd Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@xxxxxxx> Date: Thu, 18 Sep 2014 11:09:04 +1000 Subject: md/raid1: fix_read_error should act on all non-faulty devices. From: NeilBrown <neilb@xxxxxxx> commit b8cb6b4c121e1bf1963c16ed69e7adcb1bc301cd upstream. If a devices is being recovered it is not InSync and is not Faulty. If a read error is experienced on that device, fix_read_error() will be called, but it ignores non-InSync devices. So it will neither fix the error nor fail the device. It is incorrect that fix_read_error() ignores non-InSync devices. It should only ignore Faulty devices. So fix it. This became a bug when we allowed reading from a device that was being recovered. It is suitable for any subsequent -stable kernel. Fixes: da8840a747c0dbf49506ec906757a6b87b9741e9 Reported-by: Alexander Lyakas <alex.bolshoy@xxxxxxxxx> Tested-by: Alexander Lyakas <alex.bolshoy@xxxxxxxxx> Signed-off-by: NeilBrown <neilb@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/md/raid1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2154,7 +2154,7 @@ static void fix_read_error(struct r1conf d--; rdev = conf->mirrors[d].rdev; if (rdev && - test_bit(In_sync, &rdev->flags)) + !test_bit(Faulty, &rdev->flags)) r1_sync_page_io(rdev, sect, s, conf->tmppage, WRITE); } @@ -2166,7 +2166,7 @@ static void fix_read_error(struct r1conf d--; rdev = conf->mirrors[d].rdev; if (rdev && - test_bit(In_sync, &rdev->flags)) { + !test_bit(Faulty, &rdev->flags)) { if (r1_sync_page_io(rdev, sect, s, conf->tmppage, READ)) { atomic_add(s, &rdev->corrected_errors); Patches currently in stable-queue which might be from neilb@xxxxxxx are queue-3.14/md-raid1-fix_read_error-should-act-on-all-non-faulty-devices.patch queue-3.14/md-raid1-count-resync-requests-in-nr_pending.patch queue-3.14/md-raid1-update-next_resync-under-resync_lock.patch queue-3.14/md-raid1-intialise-start_next_window-for-read-case-to-avoid-hang.patch queue-3.14/md-raid1-don-t-use-next_resync-to-determine-how-far-resync-has-progressed.patch queue-3.14/md-raid1-be-more-cautious-where-we-read-balance-during-resync.patch queue-3.14/md-raid1-make-sure-resync-waits-for-conflicting-writes-to-complete.patch queue-3.14/md-raid1-clean-up-request-counts-properly-in-close_sync.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html