aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/faulty.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-06-17 18:47:42 -0400
committerNeilBrown <neilb@suse.de>2009-06-17 18:47:42 -0400
commit597a711b69cfff95c4b8f6069037e7ad3fc71f56 (patch)
tree8c2cfa4c1223827a560de2f14da426d4822151c4 /drivers/md/faulty.c
parent01ee22b496c41384eaa6dcae983c86d8bc32fbb8 (diff)
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.c13
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)
255} 255}
256 256
257 257
258static int reconfig(mddev_t *mddev, int layout, int chunk_size) 258static int reconfig(mddev_t *mddev)
259{ 259{
260 int mode = layout & ModeMask; 260 int mode = mddev->new_layout & ModeMask;
261 int count = layout >> ModeShift; 261 int count = mddev->new_layout >> ModeShift;
262 conf_t *conf = mddev->private; 262 conf_t *conf = mddev->private;
263 263
264 if (chunk_size != -1) 264 if (mddev->new_layout < 0)
265 return -EINVAL; 265 return 0;
266 266
267 /* new layout */ 267 /* new layout */
268 if (mode == ClearFaults) 268 if (mode == ClearFaults)
@@ -279,6 +279,7 @@ static int reconfig(mddev_t *mddev, int layout, int chunk_size)
279 atomic_set(&conf->counters[mode], count); 279 atomic_set(&conf->counters[mode], count);
280 } else 280 } else
281 return -EINVAL; 281 return -EINVAL;
282 mddev->new_layout = -1;
282 mddev->layout = -1; /* makes sure further changes come through */ 283 mddev->layout = -1; /* makes sure further changes come through */
283 return 0; 284 return 0;
284} 285}
@@ -315,7 +316,7 @@ static int run(mddev_t *mddev)
315 md_set_array_sectors(mddev, faulty_size(mddev, 0, 0)); 316 md_set_array_sectors(mddev, faulty_size(mddev, 0, 0));
316 mddev->private = conf; 317 mddev->private = conf;
317 318
318 reconfig(mddev, mddev->layout, -1); 319 reconfig(mddev);
319 320
320 return 0; 321 return 0;
321} 322}