aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-11 01:48:57 -0400
committerNeilBrown <neilb@suse.de>2011-10-11 01:48:57 -0400
commit69724e28ca99990a8f0b5370bb946d7704936d67 (patch)
treeb811de8d2d76a7976a9ef26d2bffddb7289ae495 /drivers/md
parente849b9381f726c0fa20c4e7b7139b936df777084 (diff)
md/multipath: typedef removal: multipath_conf_t -> struct mpconf
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/multipath.c30
-rw-r--r--drivers/md/multipath.h4
2 files changed, 16 insertions, 18 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 9c8d4b664312..96505930afcb 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -31,7 +31,7 @@
31#define NR_RESERVED_BUFS 32 31#define NR_RESERVED_BUFS 32
32 32
33 33
34static int multipath_map (multipath_conf_t *conf) 34static int multipath_map (struct mpconf *conf)
35{ 35{
36 int i, disks = conf->raid_disks; 36 int i, disks = conf->raid_disks;
37 37
@@ -59,7 +59,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
59{ 59{
60 unsigned long flags; 60 unsigned long flags;
61 struct mddev *mddev = mp_bh->mddev; 61 struct mddev *mddev = mp_bh->mddev;
62 multipath_conf_t *conf = mddev->private; 62 struct mpconf *conf = mddev->private;
63 63
64 spin_lock_irqsave(&conf->device_lock, flags); 64 spin_lock_irqsave(&conf->device_lock, flags);
65 list_add(&mp_bh->retry_list, &conf->retry_list); 65 list_add(&mp_bh->retry_list, &conf->retry_list);
@@ -76,7 +76,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
76static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err) 76static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
77{ 77{
78 struct bio *bio = mp_bh->master_bio; 78 struct bio *bio = mp_bh->master_bio;
79 multipath_conf_t *conf = mp_bh->mddev->private; 79 struct mpconf *conf = mp_bh->mddev->private;
80 80
81 bio_endio(bio, err); 81 bio_endio(bio, err);
82 mempool_free(mp_bh, conf->pool); 82 mempool_free(mp_bh, conf->pool);
@@ -86,7 +86,7 @@ static void multipath_end_request(struct bio *bio, int error)
86{ 86{
87 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 87 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
88 struct multipath_bh *mp_bh = bio->bi_private; 88 struct multipath_bh *mp_bh = bio->bi_private;
89 multipath_conf_t *conf = mp_bh->mddev->private; 89 struct mpconf *conf = mp_bh->mddev->private;
90 struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev; 90 struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev;
91 91
92 if (uptodate) 92 if (uptodate)
@@ -108,7 +108,7 @@ static void multipath_end_request(struct bio *bio, int error)
108 108
109static int multipath_make_request(struct mddev *mddev, struct bio * bio) 109static int multipath_make_request(struct mddev *mddev, struct bio * bio)
110{ 110{
111 multipath_conf_t *conf = mddev->private; 111 struct mpconf *conf = mddev->private;
112 struct multipath_bh * mp_bh; 112 struct multipath_bh * mp_bh;
113 struct multipath_info *multipath; 113 struct multipath_info *multipath;
114 114
@@ -142,7 +142,7 @@ static int multipath_make_request(struct mddev *mddev, struct bio * bio)
142 142
143static void multipath_status (struct seq_file *seq, struct mddev *mddev) 143static void multipath_status (struct seq_file *seq, struct mddev *mddev)
144{ 144{
145 multipath_conf_t *conf = mddev->private; 145 struct mpconf *conf = mddev->private;
146 int i; 146 int i;
147 147
148 seq_printf (seq, " [%d/%d] [", conf->raid_disks, 148 seq_printf (seq, " [%d/%d] [", conf->raid_disks,
@@ -157,7 +157,7 @@ static void multipath_status (struct seq_file *seq, struct mddev *mddev)
157static int multipath_congested(void *data, int bits) 157static int multipath_congested(void *data, int bits)
158{ 158{
159 struct mddev *mddev = data; 159 struct mddev *mddev = data;
160 multipath_conf_t *conf = mddev->private; 160 struct mpconf *conf = mddev->private;
161 int i, ret = 0; 161 int i, ret = 0;
162 162
163 if (mddev_congested(mddev, bits)) 163 if (mddev_congested(mddev, bits))
@@ -185,7 +185,7 @@ static int multipath_congested(void *data, int bits)
185 */ 185 */
186static void multipath_error (struct mddev *mddev, struct md_rdev *rdev) 186static void multipath_error (struct mddev *mddev, struct md_rdev *rdev)
187{ 187{
188 multipath_conf_t *conf = mddev->private; 188 struct mpconf *conf = mddev->private;
189 char b[BDEVNAME_SIZE]; 189 char b[BDEVNAME_SIZE];
190 190
191 if (conf->raid_disks - mddev->degraded <= 1) { 191 if (conf->raid_disks - mddev->degraded <= 1) {
@@ -218,7 +218,7 @@ static void multipath_error (struct mddev *mddev, struct md_rdev *rdev)
218 conf->raid_disks - mddev->degraded); 218 conf->raid_disks - mddev->degraded);
219} 219}
220 220
221static void print_multipath_conf (multipath_conf_t *conf) 221static void print_multipath_conf (struct mpconf *conf)
222{ 222{
223 int i; 223 int i;
224 struct multipath_info *tmp; 224 struct multipath_info *tmp;
@@ -244,7 +244,7 @@ static void print_multipath_conf (multipath_conf_t *conf)
244 244
245static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev) 245static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
246{ 246{
247 multipath_conf_t *conf = mddev->private; 247 struct mpconf *conf = mddev->private;
248 struct request_queue *q; 248 struct request_queue *q;
249 int err = -EEXIST; 249 int err = -EEXIST;
250 int path; 250 int path;
@@ -293,7 +293,7 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
293 293
294static int multipath_remove_disk(struct mddev *mddev, int number) 294static int multipath_remove_disk(struct mddev *mddev, int number)
295{ 295{
296 multipath_conf_t *conf = mddev->private; 296 struct mpconf *conf = mddev->private;
297 int err = 0; 297 int err = 0;
298 struct md_rdev *rdev; 298 struct md_rdev *rdev;
299 struct multipath_info *p = conf->multipaths + number; 299 struct multipath_info *p = conf->multipaths + number;
@@ -340,7 +340,7 @@ static void multipathd (struct mddev *mddev)
340 struct multipath_bh *mp_bh; 340 struct multipath_bh *mp_bh;
341 struct bio *bio; 341 struct bio *bio;
342 unsigned long flags; 342 unsigned long flags;
343 multipath_conf_t *conf = mddev->private; 343 struct mpconf *conf = mddev->private;
344 struct list_head *head = &conf->retry_list; 344 struct list_head *head = &conf->retry_list;
345 345
346 md_check_recovery(mddev); 346 md_check_recovery(mddev);
@@ -389,7 +389,7 @@ static sector_t multipath_size(struct mddev *mddev, sector_t sectors, int raid_d
389 389
390static int multipath_run (struct mddev *mddev) 390static int multipath_run (struct mddev *mddev)
391{ 391{
392 multipath_conf_t *conf; 392 struct mpconf *conf;
393 int disk_idx; 393 int disk_idx;
394 struct multipath_info *disk; 394 struct multipath_info *disk;
395 struct md_rdev *rdev; 395 struct md_rdev *rdev;
@@ -409,7 +409,7 @@ static int multipath_run (struct mddev *mddev)
409 * should be freed in multipath_stop()] 409 * should be freed in multipath_stop()]
410 */ 410 */
411 411
412 conf = kzalloc(sizeof(multipath_conf_t), GFP_KERNEL); 412 conf = kzalloc(sizeof(struct mpconf), GFP_KERNEL);
413 mddev->private = conf; 413 mddev->private = conf;
414 if (!conf) { 414 if (!conf) {
415 printk(KERN_ERR 415 printk(KERN_ERR
@@ -512,7 +512,7 @@ out:
512 512
513static int multipath_stop (struct mddev *mddev) 513static int multipath_stop (struct mddev *mddev)
514{ 514{
515 multipath_conf_t *conf = mddev->private; 515 struct mpconf *conf = mddev->private;
516 516
517 md_unregister_thread(&mddev->thread); 517 md_unregister_thread(&mddev->thread);
518 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 518 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
diff --git a/drivers/md/multipath.h b/drivers/md/multipath.h
index 350a631b6c93..717c60f62898 100644
--- a/drivers/md/multipath.h
+++ b/drivers/md/multipath.h
@@ -5,7 +5,7 @@ struct multipath_info {
5 struct md_rdev *rdev; 5 struct md_rdev *rdev;
6}; 6};
7 7
8struct multipath_private_data { 8struct mpconf {
9 struct mddev *mddev; 9 struct mddev *mddev;
10 struct multipath_info *multipaths; 10 struct multipath_info *multipaths;
11 int raid_disks; 11 int raid_disks;
@@ -15,8 +15,6 @@ struct multipath_private_data {
15 mempool_t *pool; 15 mempool_t *pool;
16}; 16};
17 17
18typedef struct multipath_private_data multipath_conf_t;
19
20/* 18/*
21 * this is our 'private' 'collective' MULTIPATH buffer head. 19 * this is our 'private' 'collective' MULTIPATH buffer head.
22 * it contains information about what kind of IO operations were started 20 * it contains information about what kind of IO operations were started