md/raid5: break stripe-batches when the array has failed.
authorNeilBrown <neilb@suse.de>
Fri, 22 May 2015 04:03:10 +0000 (14:03 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 28 May 2015 01:48:59 +0000 (11:48 +1000)
Once the array has too much failure, we need to break
stripe-batches up so they can all be dealt with.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index 3254504b108059db2149645351ff729464a2e43b..553d54b870528f0917e7518a9a783a28636d884a 100644 (file)
@@ -4337,6 +4337,7 @@ static void handle_stripe(struct stripe_head *sh)
        if (s.failed > conf->max_degraded) {
                sh->check_state = 0;
                sh->reconstruct_state = 0;
+               break_stripe_batch_list(sh, 0);
                if (s.to_read+s.to_write+s.written)
                        handle_failed_stripe(conf, sh, &s, disks, &s.return_bi);
                if (s.syncing + s.replacing)