changeset 10511:2d50053af01e

6800807 fix for CR 6642391 is not complete. Need to fix for extvtoc
author Sriram Popuri <Sriram.Popuri@sun.com>
date Mon, 14 Sep 2009 01:26:52 -0700
parents ac4291bea6be
children 24fbb79307d9
files usr/src/uts/common/io/cmlb.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/cmlb.c	Mon Sep 14 15:07:50 2009 +0800
+++ b/usr/src/uts/common/io/cmlb.c	Mon Sep 14 01:26:52 2009 -0700
@@ -4403,6 +4403,15 @@
 	cmlb_clear_efi(cl, tg_cookie);
 	ddi_remove_minor_node(CMLB_DEVINFO(cl), "wd");
 	ddi_remove_minor_node(CMLB_DEVINFO(cl), "wd,raw");
+	/*
+	 * cmlb_dkio_set_extvtoc creates duplicate minor nodes when
+	 * relabeling an SMI disk. To avoid that we remove them
+	 * before creating.
+	 * It should be OK to remove a non-existed minor node.
+	 */
+	ddi_remove_minor_node(CMLB_DEVINFO(cl), "h");
+	ddi_remove_minor_node(CMLB_DEVINFO(cl), "h,raw");
+
 	(void) cmlb_create_minor(CMLB_DEVINFO(cl), "h",
 	    S_IFBLK, (CMLBUNIT(dev) << CMLBUNIT_SHIFT) | WD_NODE,
 	    cl->cl_node_type, NULL, internal);