19 #include <linux/slab.h>
20 #include <linux/ctype.h>
21 #include <linux/errno.h>
22 #include <linux/module.h>
25 #define DM_MSG_PREFIX "multipath queue-length"
27 #define QL_VERSION "0.1.0"
41 static struct selector *alloc_selector(
void)
64 static void ql_free_paths(
struct list_head *paths)
110 int argc,
char **argv,
char **
error)
123 *error =
"queue-length ps: incorrect number of arguments";
127 if ((argc == 1) && (
sscanf(argv[0],
"%u%c", &repeat_count, &dummy) != 1)) {
128 *error =
"queue-length ps: invalid repeat count";
135 *error =
"queue-length ps: Error allocating path information";
172 unsigned *repeat_count,
size_t nr_bytes)
195 *repeat_count = best->repeat_count;
221 .name =
"queue-length",
226 .destroy = ql_destroy,
228 .add_path = ql_add_path,
229 .fail_path = ql_fail_path,
230 .reinstate_path = ql_reinstate_path,
231 .select_path = ql_select_path,
232 .start_io = ql_start_io,
236 static int __init dm_ql_init(
void)
241 DMERR(
"register failed %d", r);
248 static void __exit dm_ql_exit(
void)
253 DMERR(
"unregister failed %d", r);
261 "(C) Copyright IBM Corp. 2004,2005 All Rights Reserved.\n"
262 DM_NAME " path selector to balance the number of in-flight I/Os"