diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/io/cmlb.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/sun4v/io/vdc.c | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/cmlb.c b/usr/src/uts/common/io/cmlb.c index d381e38831..83c962afb9 100644 --- a/usr/src/uts/common/io/cmlb.c +++ b/usr/src/uts/common/io/cmlb.c @@ -2854,8 +2854,6 @@ cmlb_build_default_label(struct cmlb_lun *cl, void *tg_cookie) } cl->cl_g.dkg_apc = 0; - cl->cl_vtoc.v_nparts = V_NUMPAR; - cl->cl_vtoc.v_version = V_VERSION; /* Add backup slice */ cl->cl_vtoc.v_part[2].p_start = 0; @@ -2894,6 +2892,8 @@ cmlb_build_default_label(struct cmlb_lun *cl, void *tg_cookie) cl->cl_g.dkg_intrlv = 1; cl->cl_vtoc.v_sanity = VTOC_SANE; + cl->cl_vtoc.v_nparts = V_NUMPAR; + cl->cl_vtoc.v_version = V_VERSION; cl->cl_f_geometry_is_valid = TRUE; cl->cl_label_from_media = CMLB_LABEL_UNDEF; diff --git a/usr/src/uts/sun4v/io/vdc.c b/usr/src/uts/sun4v/io/vdc.c index 867491ca6a..b9f7c20826 100644 --- a/usr/src/uts/sun4v/io/vdc.c +++ b/usr/src/uts/sun4v/io/vdc.c @@ -7856,6 +7856,18 @@ vdc_validate_geometry(vdc_t *vdc) } /* + * Most CD/DVDs do not have a disk label and the label is + * generated by the disk driver. So the on-disk label check + * below may fail and we return now to avoid this problem. + */ + if (vdc->vdisk_media == VD_MEDIA_CD || + vdc->vdisk_media == VD_MEDIA_DVD) { + mutex_enter(&vdc->lock); + vdc_store_label_vtoc(vdc, &geom, &vtoc); + return (0); + } + + /* * Read disk label from start of disk */ buf = kmem_alloc(sizeof (buf_t), KM_SLEEP); |
