Lines Matching full:req

94 g_raid3_ctl_configure(struct gctl_req *req, struct g_class *mp)  in g_raid3_ctl_configure()  argument
106 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_configure()
108 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_configure()
112 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_configure()
115 autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync)); in g_raid3_ctl_configure()
117 gctl_error(req, "No '%s' argument.", "autosync"); in g_raid3_ctl_configure()
120 noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync)); in g_raid3_ctl_configure()
122 gctl_error(req, "No '%s' argument.", "noautosync"); in g_raid3_ctl_configure()
126 gctl_error(req, "'%s' and '%s' specified.", "autosync", in g_raid3_ctl_configure()
130 failsync = gctl_get_paraml(req, "failsync", sizeof(*failsync)); in g_raid3_ctl_configure()
132 gctl_error(req, "No '%s' argument.", "failsync"); in g_raid3_ctl_configure()
135 nofailsync = gctl_get_paraml(req, "nofailsync", sizeof(*nofailsync)); in g_raid3_ctl_configure()
137 gctl_error(req, "No '%s' argument.", "nofailsync"); in g_raid3_ctl_configure()
141 gctl_error(req, "'%s' and '%s' specified.", "failsync", in g_raid3_ctl_configure()
145 round_robin = gctl_get_paraml(req, "round_robin", sizeof(*round_robin)); in g_raid3_ctl_configure()
147 gctl_error(req, "No '%s' argument.", "round_robin"); in g_raid3_ctl_configure()
150 noround_robin = gctl_get_paraml(req, "noround_robin", in g_raid3_ctl_configure()
153 gctl_error(req, "No '%s' argument.", "noround_robin"); in g_raid3_ctl_configure()
157 gctl_error(req, "'%s' and '%s' specified.", "round_robin", in g_raid3_ctl_configure()
161 verify = gctl_get_paraml(req, "verify", sizeof(*verify)); in g_raid3_ctl_configure()
163 gctl_error(req, "No '%s' argument.", "verify"); in g_raid3_ctl_configure()
166 noverify = gctl_get_paraml(req, "noverify", sizeof(*noverify)); in g_raid3_ctl_configure()
168 gctl_error(req, "No '%s' argument.", "noverify"); in g_raid3_ctl_configure()
172 gctl_error(req, "'%s' and '%s' specified.", "verify", in g_raid3_ctl_configure()
178 gctl_error(req, "Nothing has changed."); in g_raid3_ctl_configure()
181 name = gctl_get_asciiparam(req, "arg0"); in g_raid3_ctl_configure()
183 gctl_error(req, "No 'arg%u' argument.", 0); in g_raid3_ctl_configure()
188 gctl_error(req, "No such device: %s.", name); in g_raid3_ctl_configure()
192 gctl_error(req, "Not all disks connected."); in g_raid3_ctl_configure()
260 g_raid3_ctl_rebuild(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_rebuild() argument
269 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_rebuild()
271 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_rebuild()
275 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_rebuild()
278 name = gctl_get_asciiparam(req, "arg0"); in g_raid3_ctl_rebuild()
280 gctl_error(req, "No 'arg%u' argument.", 0); in g_raid3_ctl_rebuild()
285 gctl_error(req, "No such device: %s.", name); in g_raid3_ctl_rebuild()
288 name = gctl_get_asciiparam(req, "arg1"); in g_raid3_ctl_rebuild()
290 gctl_error(req, "No 'arg%u' argument.", 1); in g_raid3_ctl_rebuild()
296 gctl_error(req, "No such provider: %s.", name); in g_raid3_ctl_rebuild()
302 gctl_error(req, "There is one stale disk already."); in g_raid3_ctl_rebuild()
321 gctl_error(req, "Cannot read metadata from %s.", pp->name); in g_raid3_ctl_rebuild()
327 gctl_error(req, "Cannot reconnect component %s.", pp->name); in g_raid3_ctl_rebuild()
332 g_raid3_ctl_stop(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_stop() argument
341 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_stop()
343 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_stop()
347 gctl_error(req, "Missing device(s)."); in g_raid3_ctl_stop()
350 force = gctl_get_paraml(req, "force", sizeof(*force)); in g_raid3_ctl_stop()
352 gctl_error(req, "No '%s' argument.", "force"); in g_raid3_ctl_stop()
362 name = gctl_get_asciiparam(req, param); in g_raid3_ctl_stop()
364 gctl_error(req, "No 'arg%u' argument.", i); in g_raid3_ctl_stop()
369 gctl_error(req, "No such device: %s.", name); in g_raid3_ctl_stop()
375 gctl_error(req, "Cannot destroy device %s (error=%d).", in g_raid3_ctl_stop()
393 g_raid3_ctl_insert(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_insert() argument
407 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_insert()
409 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_insert()
413 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_insert()
416 hardcode = gctl_get_paraml(req, "hardcode", sizeof(*hardcode)); in g_raid3_ctl_insert()
418 gctl_error(req, "No '%s' argument.", "hardcode"); in g_raid3_ctl_insert()
421 pp = gctl_get_provider(req, "arg1"); in g_raid3_ctl_insert()
424 if (gctl_get_param(req, "number", NULL) != NULL) in g_raid3_ctl_insert()
425 no = gctl_get_paraml(req, "number", sizeof(*no)); in g_raid3_ctl_insert()
434 gctl_error(req, "Cannot attach to %s.", pp->name); in g_raid3_ctl_insert()
440 gctl_error(req, "Cannot access %s.", pp->name); in g_raid3_ctl_insert()
444 name = gctl_get_asciiparam(req, "arg0"); in g_raid3_ctl_insert()
446 gctl_error(req, "No 'arg%u' argument.", 0); in g_raid3_ctl_insert()
451 gctl_error(req, "No such device: %s.", name); in g_raid3_ctl_insert()
457 gctl_error(req, "Invalid component number."); in g_raid3_ctl_insert()
463 gctl_error(req, "Component %jd is already connected.", in g_raid3_ctl_insert()
475 gctl_error(req, "No disconnected components."); in g_raid3_ctl_insert()
481 gctl_error(req, in g_raid3_ctl_insert()
489 gctl_error(req, "Provider %s too small.", pp->name); in g_raid3_ctl_insert()
493 gctl_error(req, in g_raid3_ctl_insert()
513 gctl_error(req, "Cannot store metadata on %s.", pp->name); in g_raid3_ctl_insert()
526 g_raid3_ctl_remove(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_remove() argument
534 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_remove()
536 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_remove()
540 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_remove()
543 no = gctl_get_paraml(req, "number", sizeof(*no)); in g_raid3_ctl_remove()
545 gctl_error(req, "No '%s' argument.", "no"); in g_raid3_ctl_remove()
548 name = gctl_get_asciiparam(req, "arg0"); in g_raid3_ctl_remove()
550 gctl_error(req, "No 'arg%u' argument.", 0); in g_raid3_ctl_remove()
555 gctl_error(req, "No such device: %s.", name); in g_raid3_ctl_remove()
560 gctl_error(req, "Invalid component number."); in g_raid3_ctl_remove()
572 gctl_error(req, "Cannot replace component number %jd.", in g_raid3_ctl_remove()
580 gctl_error(req, "Cannot clear metadata on %s.", in g_raid3_ctl_remove()
591 gctl_error(req, "Cannot replace component number %jd.", *no); in g_raid3_ctl_remove()
598 g_raid3_config(struct gctl_req *req, struct g_class *mp, const char *verb) in g_raid3_config() argument
604 version = gctl_get_paraml(req, "version", sizeof(*version)); in g_raid3_config()
606 gctl_error(req, "No '%s' argument.", "version"); in g_raid3_config()
610 gctl_error(req, "Userland and kernel parts are out of sync."); in g_raid3_config()
616 g_raid3_ctl_configure(req, mp); in g_raid3_config()
618 g_raid3_ctl_insert(req, mp); in g_raid3_config()
620 g_raid3_ctl_rebuild(req, mp); in g_raid3_config()
622 g_raid3_ctl_remove(req, mp); in g_raid3_config()
624 g_raid3_ctl_stop(req, mp); in g_raid3_config()
626 gctl_error(req, "Unknown verb."); in g_raid3_config()