Commit 4395b447 authored by Neil Brown's avatar Neil Brown Committed by Trond Myklebust

[PATCH] MD - nr_disks is gone from multipath/raid1

nr_disks is gone from multipath/raid1

Never used.
parent f2421da3
...@@ -274,8 +274,8 @@ static void print_multipath_conf (multipath_conf_t *conf) ...@@ -274,8 +274,8 @@ static void print_multipath_conf (multipath_conf_t *conf)
printk("(conf==NULL)\n"); printk("(conf==NULL)\n");
return; return;
} }
printk(" --- wd:%d rd:%d nd:%d\n", conf->working_disks, printk(" --- wd:%d rd:%d\n", conf->working_disks,
conf->raid_disks, conf->nr_disks); conf->raid_disks);
for (i = 0; i < MD_SB_DISKS; i++) { for (i = 0; i < MD_SB_DISKS; i++) {
tmp = conf->multipaths + i; tmp = conf->multipaths + i;
...@@ -303,7 +303,6 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -303,7 +303,6 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
p->bdev = rdev->bdev; p->bdev = rdev->bdev;
p->operational = 1; p->operational = 1;
p->used_slot = 1; p->used_slot = 1;
conf->nr_disks++;
conf->working_disks++; conf->working_disks++;
err = 0; err = 0;
} }
...@@ -332,7 +331,6 @@ static int multipath_remove_disk(mddev_t *mddev, int number) ...@@ -332,7 +331,6 @@ static int multipath_remove_disk(mddev_t *mddev, int number)
} }
p->bdev = NULL; p->bdev = NULL;
p->used_slot = 0; p->used_slot = 0;
conf->nr_disks--;
err = 0; err = 0;
} }
if (err) if (err)
...@@ -500,7 +498,6 @@ static int multipath_run (mddev_t *mddev) ...@@ -500,7 +498,6 @@ static int multipath_run (mddev_t *mddev)
} }
conf->raid_disks = sb->raid_disks = num_rdevs; conf->raid_disks = sb->raid_disks = num_rdevs;
conf->nr_disks = num_rdevs;
mddev->sb_dirty = 1; mddev->sb_dirty = 1;
conf->mddev = mddev; conf->mddev = mddev;
conf->device_lock = SPIN_LOCK_UNLOCKED; conf->device_lock = SPIN_LOCK_UNLOCKED;
......
...@@ -625,8 +625,8 @@ static void print_conf(conf_t *conf) ...@@ -625,8 +625,8 @@ static void print_conf(conf_t *conf)
printk("(!conf)\n"); printk("(!conf)\n");
return; return;
} }
printk(" --- wd:%d rd:%d nd:%d\n", conf->working_disks, printk(" --- wd:%d rd:%d\n", conf->working_disks,
conf->raid_disks, conf->nr_disks); conf->raid_disks);
for (i = 0; i < MD_SB_DISKS; i++) { for (i = 0; i < MD_SB_DISKS; i++) {
tmp = conf->mirrors + i; tmp = conf->mirrors + i;
...@@ -803,7 +803,6 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -803,7 +803,6 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
p->spare = 1; p->spare = 1;
p->used_slot = 1; p->used_slot = 1;
p->head_position = 0; p->head_position = 0;
conf->nr_disks++;
err = 0; err = 0;
} }
if (err) if (err)
...@@ -829,7 +828,6 @@ static int raid1_remove_disk(mddev_t *mddev, int number) ...@@ -829,7 +828,6 @@ static int raid1_remove_disk(mddev_t *mddev, int number)
} }
p->bdev = NULL; p->bdev = NULL;
p->used_slot = 0; p->used_slot = 0;
conf->nr_disks--;
err = 0; err = 0;
} }
if (err) if (err)
...@@ -1279,7 +1277,6 @@ static int run(mddev_t *mddev) ...@@ -1279,7 +1277,6 @@ static int run(mddev_t *mddev)
} }
} }
conf->raid_disks = sb->raid_disks; conf->raid_disks = sb->raid_disks;
conf->nr_disks = sb->nr_disks;
conf->mddev = mddev; conf->mddev = mddev;
conf->device_lock = SPIN_LOCK_UNLOCKED; conf->device_lock = SPIN_LOCK_UNLOCKED;
......
...@@ -20,7 +20,6 @@ struct multipath_info { ...@@ -20,7 +20,6 @@ struct multipath_info {
struct multipath_private_data { struct multipath_private_data {
mddev_t *mddev; mddev_t *mddev;
struct multipath_info multipaths[MD_SB_DISKS]; struct multipath_info multipaths[MD_SB_DISKS];
int nr_disks;
int raid_disks; int raid_disks;
int working_disks; int working_disks;
mdk_thread_t *thread; mdk_thread_t *thread;
......
...@@ -27,7 +27,6 @@ typedef struct r1bio_s r1bio_t; ...@@ -27,7 +27,6 @@ typedef struct r1bio_s r1bio_t;
struct r1_private_data_s { struct r1_private_data_s {
mddev_t *mddev; mddev_t *mddev;
mirror_info_t mirrors[MD_SB_DISKS]; mirror_info_t mirrors[MD_SB_DISKS];
int nr_disks;
int raid_disks; int raid_disks;
int working_disks; int working_disks;
int last_used; int last_used;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment