git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
md
/
dm-mpath.c
diff --git
a/drivers/md/dm-mpath.c
b/drivers/md/dm-mpath.c
index
5af5265
..
93f701e
100644
(file)
--- a/
drivers/md/dm-mpath.c
+++ b/
drivers/md/dm-mpath.c
@@
-21,6
+21,7
@@
#include <linux/workqueue.h>
#include <asm/atomic.h>
#include <linux/workqueue.h>
#include <asm/atomic.h>
+#define DM_MSG_PREFIX "multipath"
#define MESG_STR(x) x, sizeof(x)
/* Path properties */
#define MESG_STR(x) x, sizeof(x)
/* Path properties */
@@
-446,8
+447,6
@@
struct param {
char *error;
};
char *error;
};
-#define ESTR(s) ("dm-multipath: " s)
-
static int read_param(struct param *param, char *str, unsigned *v, char **error)
{
if (!str ||
static int read_param(struct param *param, char *str, unsigned *v, char **error)
{
if (!str ||
@@
-495,12
+494,12
@@
static int parse_path_selector(struct arg_set *as, struct priority_group *pg,
unsigned ps_argc;
static struct param _params[] = {
unsigned ps_argc;
static struct param _params[] = {
- {0, 1024,
ESTR("invalid number of path selector args")
},
+ {0, 1024,
"invalid number of path selector args"
},
};
pst = dm_get_path_selector(shift(as));
if (!pst) {
};
pst = dm_get_path_selector(shift(as));
if (!pst) {
- ti->error =
ESTR("unknown path selector type")
;
+ ti->error =
"unknown path selector type"
;
return -EINVAL;
}
return -EINVAL;
}
@@
-511,7
+510,7
@@
static int parse_path_selector(struct arg_set *as, struct priority_group *pg,
r = pst->create(&pg->ps, ps_argc, as->argv);
if (r) {
dm_put_path_selector(pst);
r = pst->create(&pg->ps, ps_argc, as->argv);
if (r) {
dm_put_path_selector(pst);
- ti->error =
ESTR("path selector constructor failed")
;
+ ti->error =
"path selector constructor failed"
;
return r;
}
return r;
}
@@
-529,7
+528,7
@@
static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps,
/* we need at least a path arg */
if (as->argc < 1) {
/* we need at least a path arg */
if (as->argc < 1) {
- ti->error =
ESTR("no device given")
;
+ ti->error =
"no device given"
;
return NULL;
}
return NULL;
}
@@
-540,7
+539,7
@@
static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps,
r = dm_get_device(ti, shift(as), ti->begin, ti->len,
dm_table_get_mode(ti->table), &p->path.dev);
if (r) {
r = dm_get_device(ti, shift(as), ti->begin, ti->len,
dm_table_get_mode(ti->table), &p->path.dev);
if (r) {
- ti->error =
ESTR("error getting device")
;
+ ti->error =
"error getting device"
;
goto bad;
}
goto bad;
}
@@
-562,8
+561,8
@@
static struct priority_group *parse_priority_group(struct arg_set *as,
struct dm_target *ti)
{
static struct param _params[] = {
struct dm_target *ti)
{
static struct param _params[] = {
- {1, 1024,
ESTR("invalid number of paths")
},
- {0, 1024,
ESTR("invalid number of selector args")
}
+ {1, 1024,
"invalid number of paths"
},
+ {0, 1024,
"invalid number of selector args"
}
};
int r;
};
int r;
@@
-572,13
+571,13
@@
static struct priority_group *parse_priority_group(struct arg_set *as,
if (as->argc < 2) {
as->argc = 0;
if (as->argc < 2) {
as->argc = 0;
- ti->error =
ESTR("not enough priority group aruments")
;
+ ti->error =
"not enough priority group aruments"
;
return NULL;
}
pg = alloc_priority_group();
if (!pg) {
return NULL;
}
pg = alloc_priority_group();
if (!pg) {
- ti->error =
ESTR("couldn't allocate priority group")
;
+ ti->error =
"couldn't allocate priority group"
;
return NULL;
}
pg->m = m;
return NULL;
}
pg->m = m;
@@
-633,7
+632,7
@@
static int parse_hw_handler(struct arg_set *as, struct multipath *m,
unsigned hw_argc;
static struct param _params[] = {
unsigned hw_argc;
static struct param _params[] = {
- {0, 1024,
ESTR("invalid number of hardware handler args")
},
+ {0, 1024,
"invalid number of hardware handler args"
},
};
r = read_param(_params, shift(as), &hw_argc, &ti->error);
};
r = read_param(_params, shift(as), &hw_argc, &ti->error);
@@
-645,14
+644,14
@@
static int parse_hw_handler(struct arg_set *as, struct multipath *m,
hwht = dm_get_hw_handler(shift(as));
if (!hwht) {
hwht = dm_get_hw_handler(shift(as));
if (!hwht) {
- ti->error =
ESTR("unknown hardware handler type")
;
+ ti->error =
"unknown hardware handler type"
;
return -EINVAL;
}
r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv);
if (r) {
dm_put_hw_handler(hwht);
return -EINVAL;
}
r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv);
if (r) {
dm_put_hw_handler(hwht);
- ti->error =
ESTR("hardware handler constructor failed")
;
+ ti->error =
"hardware handler constructor failed"
;
return r;
}
return r;
}
@@
-669,7
+668,7
@@
static int parse_features(struct arg_set *as, struct multipath *m,
unsigned argc;
static struct param _params[] = {
unsigned argc;
static struct param _params[] = {
- {0, 1,
ESTR("invalid number of feature args")
},
+ {0, 1,
"invalid number of feature args"
},
};
r = read_param(_params, shift(as), &argc, &ti->error);
};
r = read_param(_params, shift(as), &argc, &ti->error);
@@
-692,8
+691,8
@@
static int multipath_ctr(struct dm_target *ti, unsigned int argc,
{
/* target parameters */
static struct param _params[] = {
{
/* target parameters */
static struct param _params[] = {
- {1, 1024,
ESTR("invalid number of priority groups")
},
- {1, 1024,
ESTR("invalid initial priority group number")
},
+ {1, 1024,
"invalid number of priority groups"
},
+ {1, 1024,
"invalid initial priority group number"
},
};
int r;
};
int r;
@@
-707,7
+706,7
@@
static int multipath_ctr(struct dm_target *ti, unsigned int argc,
m = alloc_multipath();
if (!m) {
m = alloc_multipath();
if (!m) {
- ti->error =
ESTR("can't allocate multipath")
;
+ ti->error =
"can't allocate multipath"
;
return -EINVAL;
}
return -EINVAL;
}
@@
-748,7
+747,7
@@
static int multipath_ctr(struct dm_target *ti, unsigned int argc,
}
if (pg_count != m->nr_priority_groups) {
}
if (pg_count != m->nr_priority_groups) {
- ti->error =
ESTR("priority group count mismatch")
;
+ ti->error =
"priority group count mismatch"
;
r = -EINVAL;
goto bad;
}
r = -EINVAL;
goto bad;
}
@@
-808,7
+807,7
@@
static int fail_path(struct pgpath *pgpath)
if (!pgpath->path.is_active)
goto out;
if (!pgpath->path.is_active)
goto out;
- DMWARN("
dm-multipath:
Failing path %s.", pgpath->path.dev->name);
+ DMWARN("Failing path %s.", pgpath->path.dev->name);
pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
pgpath->path.is_active = 0;
pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
pgpath->path.is_active = 0;
@@
-1251,7
+1250,7
@@
static int multipath_message(struct dm_target *ti, unsigned argc, char **argv)
r = dm_get_device(ti, argv[1], ti->begin, ti->len,
dm_table_get_mode(ti->table), &dev);
if (r) {
r = dm_get_device(ti, argv[1], ti->begin, ti->len,
dm_table_get_mode(ti->table), &dev);
if (r) {
- DMWARN("
dm-multipath
message: error getting device %s",
+ DMWARN("message: error getting device %s",
argv[1]);
return -EINVAL;
}
argv[1]);
return -EINVAL;
}
@@
-1310,7
+1309,7
@@
static int __init dm_multipath_init(void)
return -ENOMEM;
}
return -ENOMEM;
}
- DMINFO("
dm-multipath
version %u.%u.%u loaded",
+ DMINFO("version %u.%u.%u loaded",
multipath_target.version[0], multipath_target.version[1],
multipath_target.version[2]);
multipath_target.version[0], multipath_target.version[1],
multipath_target.version[2]);