md: remove unnecessary arguments from ->reconfig method.
Passing the new layout and chunksize as args is not necessary as the mddev has fields for new_check and new_layout. This is preparation for combining the check_reshape and reconfig methods Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -255,14 +255,14 @@ static void status(struct seq_file *seq, mddev_t *mddev)
|
||||
}
|
||||
|
||||
|
||||
static int reconfig(mddev_t *mddev, int layout, int chunk_size)
|
||||
static int reconfig(mddev_t *mddev)
|
||||
{
|
||||
int mode = layout & ModeMask;
|
||||
int count = layout >> ModeShift;
|
||||
int mode = mddev->new_layout & ModeMask;
|
||||
int count = mddev->new_layout >> ModeShift;
|
||||
conf_t *conf = mddev->private;
|
||||
|
||||
if (chunk_size != -1)
|
||||
return -EINVAL;
|
||||
if (mddev->new_layout < 0)
|
||||
return 0;
|
||||
|
||||
/* new layout */
|
||||
if (mode == ClearFaults)
|
||||
@@ -279,6 +279,7 @@ static int reconfig(mddev_t *mddev, int layout, int chunk_size)
|
||||
atomic_set(&conf->counters[mode], count);
|
||||
} else
|
||||
return -EINVAL;
|
||||
mddev->new_layout = -1;
|
||||
mddev->layout = -1; /* makes sure further changes come through */
|
||||
return 0;
|
||||
}
|
||||
@@ -315,7 +316,7 @@ static int run(mddev_t *mddev)
|
||||
md_set_array_sectors(mddev, faulty_size(mddev, 0, 0));
|
||||
mddev->private = conf;
|
||||
|
||||
reconfig(mddev, mddev->layout, -1);
|
||||
reconfig(mddev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user