Commit 69724e28 authored by NeilBrown's avatar NeilBrown

md/multipath: typedef removal: multipath_conf_t -> struct mpconf

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent e849b938
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define NR_RESERVED_BUFS 32 #define NR_RESERVED_BUFS 32
static int multipath_map (multipath_conf_t *conf) static int multipath_map (struct mpconf *conf)
{ {
int i, disks = conf->raid_disks; int i, disks = conf->raid_disks;
...@@ -59,7 +59,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh) ...@@ -59,7 +59,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
{ {
unsigned long flags; unsigned long flags;
struct mddev *mddev = mp_bh->mddev; struct mddev *mddev = mp_bh->mddev;
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
spin_lock_irqsave(&conf->device_lock, flags); spin_lock_irqsave(&conf->device_lock, flags);
list_add(&mp_bh->retry_list, &conf->retry_list); list_add(&mp_bh->retry_list, &conf->retry_list);
...@@ -76,7 +76,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh) ...@@ -76,7 +76,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err) static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
{ {
struct bio *bio = mp_bh->master_bio; struct bio *bio = mp_bh->master_bio;
multipath_conf_t *conf = mp_bh->mddev->private; struct mpconf *conf = mp_bh->mddev->private;
bio_endio(bio, err); bio_endio(bio, err);
mempool_free(mp_bh, conf->pool); mempool_free(mp_bh, conf->pool);
...@@ -86,7 +86,7 @@ static void multipath_end_request(struct bio *bio, int error) ...@@ -86,7 +86,7 @@ static void multipath_end_request(struct bio *bio, int error)
{ {
int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
struct multipath_bh *mp_bh = bio->bi_private; struct multipath_bh *mp_bh = bio->bi_private;
multipath_conf_t *conf = mp_bh->mddev->private; struct mpconf *conf = mp_bh->mddev->private;
struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev; struct md_rdev *rdev = conf->multipaths[mp_bh->path].rdev;
if (uptodate) if (uptodate)
...@@ -108,7 +108,7 @@ static void multipath_end_request(struct bio *bio, int error) ...@@ -108,7 +108,7 @@ static void multipath_end_request(struct bio *bio, int error)
static int multipath_make_request(struct mddev *mddev, struct bio * bio) static int multipath_make_request(struct mddev *mddev, struct bio * bio)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
struct multipath_bh * mp_bh; struct multipath_bh * mp_bh;
struct multipath_info *multipath; struct multipath_info *multipath;
...@@ -142,7 +142,7 @@ static int multipath_make_request(struct mddev *mddev, struct bio * bio) ...@@ -142,7 +142,7 @@ static int multipath_make_request(struct mddev *mddev, struct bio * bio)
static void multipath_status (struct seq_file *seq, struct mddev *mddev) static void multipath_status (struct seq_file *seq, struct mddev *mddev)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
int i; int i;
seq_printf (seq, " [%d/%d] [", conf->raid_disks, seq_printf (seq, " [%d/%d] [", conf->raid_disks,
...@@ -157,7 +157,7 @@ static void multipath_status (struct seq_file *seq, struct mddev *mddev) ...@@ -157,7 +157,7 @@ static void multipath_status (struct seq_file *seq, struct mddev *mddev)
static int multipath_congested(void *data, int bits) static int multipath_congested(void *data, int bits)
{ {
struct mddev *mddev = data; struct mddev *mddev = data;
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
int i, ret = 0; int i, ret = 0;
if (mddev_congested(mddev, bits)) if (mddev_congested(mddev, bits))
...@@ -185,7 +185,7 @@ static int multipath_congested(void *data, int bits) ...@@ -185,7 +185,7 @@ static int multipath_congested(void *data, int bits)
*/ */
static void multipath_error (struct mddev *mddev, struct md_rdev *rdev) static void multipath_error (struct mddev *mddev, struct md_rdev *rdev)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
if (conf->raid_disks - mddev->degraded <= 1) { if (conf->raid_disks - mddev->degraded <= 1) {
...@@ -218,7 +218,7 @@ static void multipath_error (struct mddev *mddev, struct md_rdev *rdev) ...@@ -218,7 +218,7 @@ static void multipath_error (struct mddev *mddev, struct md_rdev *rdev)
conf->raid_disks - mddev->degraded); conf->raid_disks - mddev->degraded);
} }
static void print_multipath_conf (multipath_conf_t *conf) static void print_multipath_conf (struct mpconf *conf)
{ {
int i; int i;
struct multipath_info *tmp; struct multipath_info *tmp;
...@@ -244,7 +244,7 @@ static void print_multipath_conf (multipath_conf_t *conf) ...@@ -244,7 +244,7 @@ static void print_multipath_conf (multipath_conf_t *conf)
static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev) static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
struct request_queue *q; struct request_queue *q;
int err = -EEXIST; int err = -EEXIST;
int path; int path;
...@@ -293,7 +293,7 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev) ...@@ -293,7 +293,7 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
static int multipath_remove_disk(struct mddev *mddev, int number) static int multipath_remove_disk(struct mddev *mddev, int number)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
int err = 0; int err = 0;
struct md_rdev *rdev; struct md_rdev *rdev;
struct multipath_info *p = conf->multipaths + number; struct multipath_info *p = conf->multipaths + number;
...@@ -340,7 +340,7 @@ static void multipathd (struct mddev *mddev) ...@@ -340,7 +340,7 @@ static void multipathd (struct mddev *mddev)
struct multipath_bh *mp_bh; struct multipath_bh *mp_bh;
struct bio *bio; struct bio *bio;
unsigned long flags; unsigned long flags;
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
struct list_head *head = &conf->retry_list; struct list_head *head = &conf->retry_list;
md_check_recovery(mddev); md_check_recovery(mddev);
...@@ -389,7 +389,7 @@ static sector_t multipath_size(struct mddev *mddev, sector_t sectors, int raid_d ...@@ -389,7 +389,7 @@ static sector_t multipath_size(struct mddev *mddev, sector_t sectors, int raid_d
static int multipath_run (struct mddev *mddev) static int multipath_run (struct mddev *mddev)
{ {
multipath_conf_t *conf; struct mpconf *conf;
int disk_idx; int disk_idx;
struct multipath_info *disk; struct multipath_info *disk;
struct md_rdev *rdev; struct md_rdev *rdev;
...@@ -409,7 +409,7 @@ static int multipath_run (struct mddev *mddev) ...@@ -409,7 +409,7 @@ static int multipath_run (struct mddev *mddev)
* should be freed in multipath_stop()] * should be freed in multipath_stop()]
*/ */
conf = kzalloc(sizeof(multipath_conf_t), GFP_KERNEL); conf = kzalloc(sizeof(struct mpconf), GFP_KERNEL);
mddev->private = conf; mddev->private = conf;
if (!conf) { if (!conf) {
printk(KERN_ERR printk(KERN_ERR
...@@ -512,7 +512,7 @@ static int multipath_run (struct mddev *mddev) ...@@ -512,7 +512,7 @@ static int multipath_run (struct mddev *mddev)
static int multipath_stop (struct mddev *mddev) static int multipath_stop (struct mddev *mddev)
{ {
multipath_conf_t *conf = mddev->private; struct mpconf *conf = mddev->private;
md_unregister_thread(&mddev->thread); md_unregister_thread(&mddev->thread);
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
......
...@@ -5,7 +5,7 @@ struct multipath_info { ...@@ -5,7 +5,7 @@ struct multipath_info {
struct md_rdev *rdev; struct md_rdev *rdev;
}; };
struct multipath_private_data { struct mpconf {
struct mddev *mddev; struct mddev *mddev;
struct multipath_info *multipaths; struct multipath_info *multipaths;
int raid_disks; int raid_disks;
...@@ -15,8 +15,6 @@ struct multipath_private_data { ...@@ -15,8 +15,6 @@ struct multipath_private_data {
mempool_t *pool; mempool_t *pool;
}; };
typedef struct multipath_private_data multipath_conf_t;
/* /*
* this is our 'private' 'collective' MULTIPATH buffer head. * this is our 'private' 'collective' MULTIPATH buffer head.
* it contains information about what kind of IO operations were started * it contains information about what kind of IO operations were started
......
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