diff options
author | NeilBrown <neilb@suse.com> | 2015-07-24 06:30:32 +0300 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-08-31 20:38:59 +0300 |
commit | 6cbd81487f7cfa30e22537bf7cd07f48c4e7164d (patch) | |
tree | 65d510b83cb87211dd53c636fe54c414df3015bd /drivers/md/md.c | |
parent | 5ed1df2eacc0ba92c8c7e2499c97594b5ef928a8 (diff) | |
download | linux-6cbd81487f7cfa30e22537bf7cd07f48c4e7164d.tar.xz |
md/raid5: handle possible race as reshape completes.
It is possible (though unlikely) for a reshape to be
interrupted between the time that end_reshape is called
and the time when raid5_finish_reshape is called.
This can leave conf->reshape_progress set to MaxSector,
but mddev->reshape_position not.
This combination confused reshape_request() when ->reshape_backwards.
As conf->reshape_progress is so high, it seems the reshape hasn't
really begun. But assuming MaxSector is a valid address only
leads to sorrow.
So ensure reshape_position and reshape_progress both agree,
and add an extra check in reshape_request() just in case they don't.
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md.c')
0 files changed, 0 insertions, 0 deletions