diff options
author | NeilBrown <neilb@suse.com> | 2015-07-17 12:17:50 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-08-31 19:32:25 +0200 |
commit | 5cac6bcb9312a18a5091976fc374b4c7b9c4ae2e (patch) | |
tree | 5d6690c3656baf707764189d8f5f2fc3df6a7154 /drivers/md | |
parent | 02ec50265b16493e4a62228727e9f774068123d2 (diff) | |
download | op-kernel-dev-5cac6bcb9312a18a5091976fc374b4c7b9c4ae2e.zip op-kernel-dev-5cac6bcb9312a18a5091976fc374b4c7b9c4ae2e.tar.gz |
md/raid5: always set conf->prev_chunk_sectors and ->prev_algo
These aren't really needed when no reshape is happening,
but it is safer to have them always set to a meaningful value.
The next patch will use ->prev_chunk_sectors without checking
if a reshape is happening (because that makes the code simpler),
and this patch makes that safe.
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 256b05d..e543bfd 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6568,6 +6568,9 @@ static struct r5conf *setup_conf(struct mddev *mddev) if (conf->reshape_progress != MaxSector) { conf->prev_chunk_sectors = mddev->chunk_sectors; conf->prev_algo = mddev->layout; + } else { + conf->prev_chunk_sectors = conf->chunk_sectors; + conf->prev_algo = conf->algorithm; } conf->min_nr_stripes = NR_STRIPES; |