diff options
author | NeilBrown <neilb@suse.de> | 2009-06-18 02:47:42 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-18 02:47:42 +0400 |
commit | 597a711b69cfff95c4b8f6069037e7ad3fc71f56 (patch) | |
tree | 8c2cfa4c1223827a560de2f14da426d4822151c4 /drivers/md/faulty.c | |
parent | 01ee22b496c41384eaa6dcae983c86d8bc32fbb8 (diff) | |
download | linux-597a711b69cfff95c4b8f6069037e7ad3fc71f56.tar.xz |
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>
Diffstat (limited to 'drivers/md/faulty.c')
-rw-r--r-- | drivers/md/faulty.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 8695809b24b0..6513b7b3e379 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c @@ -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; } |