Mercurial > illumos > illumos-gate
changeset 46:042bf15ebd92
6274840 Cluster node(s) panic when I/O is starting on nodes during reconfig.
author | skamm |
---|---|
date | Mon, 20 Jun 2005 23:32:22 -0700 |
parents | 43312befee79 |
children | 970309425c6e |
files | usr/src/cmd/lvm/util/metaclust.c usr/src/uts/common/io/lvm/mirror/mirror.c usr/src/uts/common/io/lvm/softpart/sp.c usr/src/uts/common/io/lvm/stripe/stripe.c |
diffstat | 4 files changed, 43 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/lvm/util/metaclust.c Mon Jun 20 22:21:51 2005 -0700 +++ b/usr/src/cmd/lvm/util/metaclust.c Mon Jun 20 23:32:22 2005 -0700 @@ -934,10 +934,10 @@ /* * Set start step flag for set. This is set to indicate - * that the reconfig cycle entered through the start - * step and is used in reconfig step 4 to determine - * whether the node had entered through the start - * step or the return step. + * that this node entered the reconfig cycle through + * the start step. This is used during the reconfig + * cycle to determine whether the node had entered + * through the start step or the return step. */ (void) memset(&sf, 0, sizeof (sf)); sf.sf_setno = sp->setno;
--- a/usr/src/uts/common/io/lvm/mirror/mirror.c Mon Jun 20 22:21:51 2005 -0700 +++ b/usr/src/uts/common/io/lvm/mirror/mirror.c Mon Jun 20 23:32:22 2005 -0700 @@ -5142,6 +5142,20 @@ mirror_open(dev_t *dev, int flag, int otyp, cred_t *cred_p, int md_oflags) { IOLOCK lock; + minor_t mnum = getminor(*dev); + set_t setno; + + /* + * When doing an open of a multi owner metadevice, check to see if this + * node is a starting node and if a reconfig cycle is underway. + * If so, the system isn't sufficiently set up enough to handle the + * open (which involves I/O during sp_validate), so fail with ENXIO. + */ + setno = MD_MIN2SET(mnum); + if ((md_set[setno].s_status & (MD_SET_MNSET | MD_SET_MN_START_RC)) == + (MD_SET_MNSET | MD_SET_MN_START_RC)) { + return (ENXIO); + } if (md_oflags & MD_OFLG_FROMIOCTL) { /*
--- a/usr/src/uts/common/io/lvm/softpart/sp.c Mon Jun 20 22:21:51 2005 -0700 +++ b/usr/src/uts/common/io/lvm/softpart/sp.c Mon Jun 20 23:32:22 2005 -0700 @@ -1459,6 +1459,18 @@ int err = 0; set_t setno; + /* + * When doing an open of a multi owner metadevice, check to see if this + * node is a starting node and if a reconfig cycle is underway. + * If so, the system isn't sufficiently set up enough to handle the + * open (which involves I/O during sp_validate), so fail with ENXIO. + */ + setno = MD_MIN2SET(mnum); + if ((md_set[setno].s_status & (MD_SET_MNSET | MD_SET_MN_START_RC)) == + (MD_SET_MNSET | MD_SET_MN_START_RC)) { + return (ENXIO); + } + /* grab necessary locks */ un = (mp_unit_t *)md_unit_openclose_enter(ui); setno = MD_UN2SET(un);
--- a/usr/src/uts/common/io/lvm/stripe/stripe.c Mon Jun 20 22:21:51 2005 -0700 +++ b/usr/src/uts/common/io/lvm/stripe/stripe.c Mon Jun 20 23:32:22 2005 -0700 @@ -946,6 +946,19 @@ mdi_unit_t *ui = MDI_UNIT(mnum); ms_unit_t *un; int err = 0; + set_t setno; + + /* + * When doing an open of a multi owner metadevice, check to see if this + * node is a starting node and if a reconfig cycle is underway. + * If so, the system isn't sufficiently set up enough to handle the + * open (which involves I/O during sp_validate), so fail with ENXIO. + */ + setno = MD_MIN2SET(mnum); + if ((md_set[setno].s_status & (MD_SET_MNSET | MD_SET_MN_START_RC)) == + (MD_SET_MNSET | MD_SET_MN_START_RC)) { + return (ENXIO); + } /* single thread */ un = (ms_unit_t *)md_unit_openclose_enter(ui);