diff options
author | mav <mav@FreeBSD.org> | 2012-04-18 09:42:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-04-18 09:42:14 +0000 |
commit | 91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc (patch) | |
tree | f795390c1bf7cf3a8fad5b540e390767cf5fa8d6 /sbin/geom/class/multipath/geom_multipath.c | |
parent | 0d3166270cacbd524f40f7818d75c0e727e545d1 (diff) | |
download | FreeBSD-src-91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc.zip FreeBSD-src-91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc.tar.gz |
Some improvements to GEOM MULTIPATH:
- Implement "configure" command to allow switching operation mode of
running device on-fly without destroying and recreation.
- Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
In this mode all paths not marked FAIL may handle reads same time,
but unlike Active/Active only one path handles write requests at any
point in time. It allows to closer follow original write request order
if above layers need it for data consistency (not waiting for requisite
write completion before sending dependent write).
- Hide duplicate messages about device status change.
- Remove periodic thread wake up with 10Hz rate.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sbin/geom/class/multipath/geom_multipath.c')
-rw-r--r-- | sbin/geom/class/multipath/geom_multipath.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sbin/geom/class/multipath/geom_multipath.c b/sbin/geom/class/multipath/geom_multipath.c index ecbaa37..a821951 100644 --- a/sbin/geom/class/multipath/geom_multipath.c +++ b/sbin/geom/class/multipath/geom_multipath.c @@ -55,17 +55,28 @@ struct g_command class_commands[] = { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { { 'A', "active_active", NULL, G_TYPE_BOOL }, + { 'R', "active_read", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-vA] name prov ..." + "[-vAR] name prov ..." }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main, { { 'A', "active_active", NULL, G_TYPE_BOOL }, + { 'R', "active_read", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-vA] name prov ..." + "[-vAR] name prov ..." + }, + { "configure", G_FLAG_VERBOSE, NULL, + { + { 'A', "active_active", NULL, G_TYPE_BOOL }, + { 'P', "active_passive", NULL, G_TYPE_BOOL }, + { 'R', "active_read", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + "[-vAPR] name" }, { "add", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, @@ -196,6 +207,8 @@ mp_label(struct gctl_req *req) } strlcpy(md.md_uuid, ptr, sizeof (md.md_uuid)); md.md_active_active = gctl_get_int(req, "active_active"); + if (gctl_get_int(req, "active_read")) + md.md_active_active = 2; free(ptr); /* |