Date: Fri, 15 Apr 2016 16:36:17 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298072 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201604151636.u3FGaHm1099478@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Fri Apr 15 16:36:17 2016 New Revision: 298072 URL: https://svnweb.freebsd.org/changeset/base/298072 Log: Don't corrupt ZFS label's physpath attribute when booting while a disk is missing Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach prior to verifying the device's GUIDs. vdev_geom_attach calls vdev_geom_attrchange to set the physpath in the vdev object. The result is that if the disk could not be found, then the labels for other disks in the same TLD would overwrite the missing disk's physpath with the physpath of whichever disk currently has the same devname as the missing one used to have. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 15 16:21:13 2016 (r298071) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 15 16:36:17 2016 (r298072) @@ -246,9 +246,6 @@ vdev_geom_attach(struct g_provider *pp, cp->private = vd; vd->vdev_tsd = cp; - /* Fetch initial physical path information for this device. */ - vdev_geom_attrchanged(cp, "GEOM::physpath"); - cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); } @@ -805,6 +802,10 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi } } + /* Fetch initial physical path information for this device. */ + if (cp != NULL) + vdev_geom_attrchanged(cp, "GEOM::physpath"); + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604151636.u3FGaHm1099478>