Commit f3a221f2 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman

md/raid1: intialise start_next_window for READ case to avoid hang

commit f0cc9a05 upstream.

r1_bio->start_next_window is not initialised in the READ
case, so allow_barrier may incorrectly decrement
   conf->current_window_requests
which can cause raise_barrier() to block forever.

Fixes: 79ef3a8aReported-by: default avatarBrassow Jonathan <jbrassow@redhat.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b867dcdf
...@@ -1185,6 +1185,7 @@ static void make_request(struct mddev *mddev, struct bio * bio) ...@@ -1185,6 +1185,7 @@ static void make_request(struct mddev *mddev, struct bio * bio)
atomic_read(&bitmap->behind_writes) == 0); atomic_read(&bitmap->behind_writes) == 0);
} }
r1_bio->read_disk = rdisk; r1_bio->read_disk = rdisk;
r1_bio->start_next_window = 0;
read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev); read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev);
bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector, bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment