diff options
| author | Sriram Popuri <Sriram.Popuri@sun.com> | 2009-01-19 07:19:43 -0800 |
|---|---|---|
| committer | Sriram Popuri <Sriram.Popuri@sun.com> | 2009-01-19 07:19:43 -0800 |
| commit | 48794f22b496c8c5aaa74b67fdff1a4c0409a7a7 (patch) | |
| tree | 0ba635afbd7e880cc744b16d484b17e7cdebee4a | |
| parent | 95c2d3023b88b9097d9822eb47ace5466e6d1cf4 (diff) | |
| download | illumos-gate-48794f22b496c8c5aaa74b67fdff1a4c0409a7a7.tar.gz | |
6642391 Relabeling disk vtoc via DKIOCSVTOC ioctl creates duplicate minor nodes for slice 7
| -rw-r--r-- | usr/src/uts/common/io/cmlb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/cmlb.c b/usr/src/uts/common/io/cmlb.c index c0531305fe..218370abfc 100644 --- a/usr/src/uts/common/io/cmlb.c +++ b/usr/src/uts/common/io/cmlb.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -3737,6 +3737,16 @@ cmlb_dkio_set_vtoc(struct cmlb_lun *cl, dev_t dev, caddr_t arg, int flag, 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_vtoc 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); |
