Commit c140b4a0 authored by Alasdair G. Kergon's avatar Alasdair G. Kergon Committed by Linus Torvalds

[PATCH] device-mapper: Some multipath fn renames

Rename ctr to create etc.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7250613f
...@@ -229,7 +229,7 @@ static struct emc_handler *alloc_emc_handler(void) ...@@ -229,7 +229,7 @@ static struct emc_handler *alloc_emc_handler(void)
return h; return h;
} }
static int emc_ctr(struct hw_handler *hwh, unsigned argc, char **argv) static int emc_create(struct hw_handler *hwh, unsigned argc, char **argv)
{ {
struct emc_handler *h; struct emc_handler *h;
unsigned hr, short_trespass; unsigned hr, short_trespass;
...@@ -276,7 +276,7 @@ static int emc_ctr(struct hw_handler *hwh, unsigned argc, char **argv) ...@@ -276,7 +276,7 @@ static int emc_ctr(struct hw_handler *hwh, unsigned argc, char **argv)
return 0; return 0;
} }
static void emc_dtr(struct hw_handler *hwh) static void emc_destroy(struct hw_handler *hwh)
{ {
struct emc_handler *h = (struct emc_handler *) hwh->context; struct emc_handler *h = (struct emc_handler *) hwh->context;
...@@ -284,7 +284,7 @@ static void emc_dtr(struct hw_handler *hwh) ...@@ -284,7 +284,7 @@ static void emc_dtr(struct hw_handler *hwh)
hwh->context = NULL; hwh->context = NULL;
} }
static unsigned emc_err(struct hw_handler *hwh, struct bio *bio) static unsigned emc_error(struct hw_handler *hwh, struct bio *bio)
{ {
/* FIXME: Patch from axboe still missing */ /* FIXME: Patch from axboe still missing */
#if 0 #if 0
...@@ -325,10 +325,10 @@ static unsigned emc_err(struct hw_handler *hwh, struct bio *bio) ...@@ -325,10 +325,10 @@ static unsigned emc_err(struct hw_handler *hwh, struct bio *bio)
static struct hw_handler_type emc_hwh = { static struct hw_handler_type emc_hwh = {
.name = "emc", .name = "emc",
.module = THIS_MODULE, .module = THIS_MODULE,
.ctr = emc_ctr, .create = emc_create,
.dtr = emc_dtr, .destroy = emc_destroy,
.pg_init = emc_pg_init, .pg_init = emc_pg_init,
.err = emc_err, .error = emc_error,
}; };
static int __init dm_emc_init(void) static int __init dm_emc_init(void)
......
...@@ -27,12 +27,13 @@ struct hw_handler_type { ...@@ -27,12 +27,13 @@ struct hw_handler_type {
char *name; char *name;
struct module *module; struct module *module;
int (*ctr) (struct hw_handler *handler, unsigned int argc, char **argv); int (*create) (struct hw_handler *handler, unsigned int argc,
void (*dtr) (struct hw_handler *hwh); char **argv);
void (*destroy) (struct hw_handler *hwh);
void (*pg_init) (struct hw_handler *hwh, unsigned bypassed, void (*pg_init) (struct hw_handler *hwh, unsigned bypassed,
struct path *path); struct path *path);
unsigned (*err) (struct hw_handler *hwh, struct bio *bio); unsigned (*error) (struct hw_handler *hwh, struct bio *bio);
int (*status) (struct hw_handler *hwh, status_type_t type, int (*status) (struct hw_handler *hwh, status_type_t type,
char *result, unsigned int maxlen); char *result, unsigned int maxlen);
}; };
......
...@@ -157,7 +157,7 @@ static void free_priority_group(struct priority_group *pg, ...@@ -157,7 +157,7 @@ static void free_priority_group(struct priority_group *pg,
struct path_selector *ps = &pg->ps; struct path_selector *ps = &pg->ps;
if (ps->type) { if (ps->type) {
ps->type->dtr(ps); ps->type->destroy(ps);
dm_put_path_selector(ps->type); dm_put_path_selector(ps->type);
} }
...@@ -199,7 +199,7 @@ static void free_multipath(struct multipath *m) ...@@ -199,7 +199,7 @@ static void free_multipath(struct multipath *m)
} }
if (hwh->type) { if (hwh->type) {
hwh->type->dtr(hwh); hwh->type->destroy(hwh);
dm_put_hw_handler(hwh->type); dm_put_hw_handler(hwh->type);
} }
...@@ -495,7 +495,7 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg, ...@@ -495,7 +495,7 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg,
if (r) if (r)
return -EINVAL; return -EINVAL;
r = pst->ctr(&pg->ps, ps_argc, as->argv); r = pst->create(&pg->ps, ps_argc, as->argv);
if (r) { if (r) {
dm_put_path_selector(pst); dm_put_path_selector(pst);
ti->error = ESTR("path selector constructor failed"); ti->error = ESTR("path selector constructor failed");
...@@ -636,7 +636,7 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m, ...@@ -636,7 +636,7 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m,
return -EINVAL; return -EINVAL;
} }
r = hwht->ctr(&m->hw_handler, hw_argc - 1, as->argv); r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv);
if (r) { if (r) {
dm_put_hw_handler(hwht); dm_put_hw_handler(hwht);
ti->error = ESTR("hardware handler constructor failed"); ti->error = ESTR("hardware handler constructor failed");
...@@ -996,8 +996,8 @@ static int do_end_io(struct multipath *m, struct bio *bio, ...@@ -996,8 +996,8 @@ static int do_end_io(struct multipath *m, struct bio *bio,
} }
spin_unlock(&m->lock); spin_unlock(&m->lock);
if (hwh->type && hwh->type->err) if (hwh->type && hwh->type->error)
err_flags = hwh->type->err(hwh, bio); err_flags = hwh->type->error(hwh, bio);
if (mpio->pgpath) { if (mpio->pgpath) {
if (err_flags & MP_FAIL_PATH) if (err_flags & MP_FAIL_PATH)
......
...@@ -37,8 +37,8 @@ struct path_selector_type { ...@@ -37,8 +37,8 @@ struct path_selector_type {
/* /*
* Constructs a path selector object, takes custom arguments * Constructs a path selector object, takes custom arguments
*/ */
int (*ctr) (struct path_selector *ps, unsigned argc, char **argv); int (*create) (struct path_selector *ps, unsigned argc, char **argv);
void (*dtr) (struct path_selector *ps); void (*destroy) (struct path_selector *ps);
/* /*
* Add an opaque path object, along with some selector specific * Add an opaque path object, along with some selector specific
......
...@@ -56,7 +56,7 @@ static struct selector *alloc_selector(void) ...@@ -56,7 +56,7 @@ static struct selector *alloc_selector(void)
return s; return s;
} }
static int rr_ctr(struct path_selector *ps, unsigned argc, char **argv) static int rr_create(struct path_selector *ps, unsigned argc, char **argv)
{ {
struct selector *s; struct selector *s;
...@@ -68,7 +68,7 @@ static int rr_ctr(struct path_selector *ps, unsigned argc, char **argv) ...@@ -68,7 +68,7 @@ static int rr_ctr(struct path_selector *ps, unsigned argc, char **argv)
return 0; return 0;
} }
static void rr_dtr(struct path_selector *ps) static void rr_destroy(struct path_selector *ps)
{ {
struct selector *s = (struct selector *) ps->context; struct selector *s = (struct selector *) ps->context;
...@@ -177,8 +177,8 @@ static struct path_selector_type rr_ps = { ...@@ -177,8 +177,8 @@ static struct path_selector_type rr_ps = {
.module = THIS_MODULE, .module = THIS_MODULE,
.table_args = 1, .table_args = 1,
.info_args = 0, .info_args = 0,
.ctr = rr_ctr, .create = rr_create,
.dtr = rr_dtr, .destroy = rr_destroy,
.status = rr_status, .status = rr_status,
.add_path = rr_add_path, .add_path = rr_add_path,
.fail_path = rr_fail_path, .fail_path = rr_fail_path,
......
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