]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: count resync requests in nr_pending.
authorNeilBrown <neilb@suse.de>
Tue, 16 Sep 2014 02:14:14 +0000 (12:14 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 22 Sep 2014 01:26:01 +0000 (11:26 +1000)
commitaf17c4b332602f0626c4a312687b18b4c7600b0d
treebc1ba06965b5330491a2aef8a23f86cd1e93f6f2
parent32c0b260c95ccb3737fd586e0ff59a000816e305
md/raid1: count resync requests in nr_pending.

Both normal IO and resync IO can be retried with reschedule_retry()
and so be counted into ->nr_queued, but only normal IO gets counted in
->nr_pending.

Before the recent improvement to RAID1 resync there could only
possibly have been one or the other on the queue.  When handling a
read failure it could only be normal IO.  So when handle_read_error()
called freeze_array() the fact that freeze_array only compares
->nr_queued against ->nr_pending was safe.

But now that these two types can interleave, we can have both normal
and resync IO requests queued, so we need to count them both in
nr_pending.

This error can lead to freeze_array() hanging if there is a read
error, so it is suitable for -stable.

Fixes: e392bfc1d3ad94b1774445ed8d2d5cc893c0d378
cc: stable@vger.kernel.org (v3.13+)
Reported-by: Brassow Jonathan <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c