summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJames Hall <James.Hall@Sun.COM>2010-04-22 13:45:43 +0100
committerJames Hall <James.Hall@Sun.COM>2010-04-22 13:45:43 +0100
commit704030f4517ac42005a5e3a4cb2fe578c959bfe2 (patch)
treeba2e325e7522d0c4b1b2ce504f5ad9228bf6eeb1 /usr/src
parentb6c573b6170aa329dfd387cc19f32a7919c4ff4c (diff)
downloadillumos-joyent-704030f4517ac42005a5e3a4cb2fe578c959bfe2.tar.gz
6915045 The second soft partitions' metainit creates 2 duplicate entries in metastat and md.cf
6809887 Metaset output for OBAN diskset truncates host name if host name exceeds 17 characters 6624259 Soft partitions on simple volume cannot be removed after metareplace
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/lvm/util/metaset.c19
-rw-r--r--usr/src/lib/lvm/libmeta/common/meta_sp.c5
-rw-r--r--usr/src/uts/common/io/lvm/stripe/stripe.c9
3 files changed, 20 insertions, 13 deletions
diff --git a/usr/src/cmd/lvm/util/metaset.c b/usr/src/cmd/lvm/util/metaset.c
index 6a055815a6..c83455c6a1 100644
--- a/usr/src/cmd/lvm/util/metaset.c
+++ b/usr/src/cmd/lvm/util/metaset.c
@@ -19,8 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
@@ -161,6 +160,10 @@ printset(mdsetname_t *sp, md_error_t *ep)
* nodes would have different nodelists possibly
* causing different nodes to to choose different
* masters.
+ *
+ * Standard hostname field is 17 bytes but metaset
+ * will display up to MD_MAX_NODENAME, defined in
+ * meta_basic.h
*/
if (!(nd->nd_flags & MD_MN_NODE_OK)) {
nd = nd->nd_next;
@@ -169,26 +172,30 @@ printset(mdsetname_t *sp, md_error_t *ep)
if ((nd->nd_flags & MD_MN_NODE_ALIVE) &&
(nd->nd_flags & MD_MN_NODE_OWN)) {
(void) printf(
- gettext(" %-17.17s %-12.12s %-4.4s\n"),
+ gettext(" %-17.*s %-12.12s %-4.4s\n"),
+ MD_MAX_NODENAME,
nd->nd_nodename, gettext("multi-owner"),
gettext("Yes"));
} else if ((!(nd->nd_flags & MD_MN_NODE_ALIVE)) &&
(nd->nd_flags & MD_MN_NODE_OWN)) {
/* Should never be able to happen */
(void) printf(
- gettext(" %-17.17s %-12.12s %-4.4s\n"),
+ gettext(" %-17.*s %-12.12s %-4.4s\n"),
+ MD_MAX_NODENAME,
nd->nd_nodename, gettext("multi-owner"),
gettext("No"));
} else if ((nd->nd_flags & MD_MN_NODE_ALIVE) &&
(!(nd->nd_flags & MD_MN_NODE_OWN))) {
(void) printf(
- gettext(" %-17.17s %-12.12s %-4.4s\n"),
+ gettext(" %-17.*s %-12.12s %-4.4s\n"),
+ MD_MAX_NODENAME,
nd->nd_nodename, gettext(""),
gettext("Yes"));
} else if ((!(nd->nd_flags & MD_MN_NODE_ALIVE)) &&
(!(nd->nd_flags & MD_MN_NODE_OWN))) {
(void) printf(
- gettext(" %-17.17s %-12.12s %-4.4s\n"),
+ gettext(" %-17.*s %-12.12s %-4.4s\n"),
+ MD_MAX_NODENAME,
nd->nd_nodename, gettext(""),
gettext("No"));
}
diff --git a/usr/src/lib/lvm/libmeta/common/meta_sp.c b/usr/src/lib/lvm/libmeta/common/meta_sp.c
index b71f867c51..3b9ec353eb 100644
--- a/usr/src/lib/lvm/libmeta/common/meta_sp.c
+++ b/usr/src/lib/lvm/libmeta/common/meta_sp.c
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
@@ -2356,7 +2355,7 @@ meta_sp_print(
}
if (sp_parent_printed[setno] == NULL)
sp_parent_printed[setno] =
- Zalloc(BT_BITOUL(MD_MAXUNITS));
+ Zalloc(BT_SIZEOFMAP(MD_MAXUNITS));
BT_SET(sp_parent_printed[setno], unit);
}
}
diff --git a/usr/src/uts/common/io/lvm/stripe/stripe.c b/usr/src/uts/common/io/lvm/stripe/stripe.c
index 6309ce86b3..cfc7d6ddcf 100644
--- a/usr/src/uts/common/io/lvm/stripe/stripe.c
+++ b/usr/src/uts/common/io/lvm/stripe/stripe.c
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#include <sys/param.h>
@@ -1282,6 +1281,7 @@ stripe_replace_dev(md_dev64_t dev, void *junk, int ci, ms_new_dev_t *nd,
set_t setno;
side_t side;
md_dev64_t this_dev;
+ md_dev64_t old_dev;
mnum = md_getminor(dev);
ui = MDI_UNIT(mnum);
@@ -1294,6 +1294,7 @@ stripe_replace_dev(md_dev64_t dev, void *junk, int ci, ms_new_dev_t *nd,
comp = (struct ms_comp *)((void *)&((char *)un)[un->un_ocomp]);
comp += ci;
+ old_dev = comp->un_dev;
/*
* Count the number of components
@@ -1479,10 +1480,10 @@ stripe_replace_dev(md_dev64_t dev, void *junk, int ci, ms_new_dev_t *nd,
* if it's a metadevice.
*/
if (md_getmajor(comp->un_dev) == md_major) {
- minor_t comp_mnum = md_getminor(comp->un_dev);
+ minor_t comp_mnum = md_getminor(old_dev);
md_unit_t *comp_un = MD_UNIT(comp_mnum);
- md_reset_parent(comp->un_dev);
+ md_reset_parent(old_dev);
recids[rid++] = MD_RECID(comp_un);
}
}