svn commit: r308591 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Sat Nov 12 23:39:09 UTC 2016
Author: mav
Date: Sat Nov 12 23:39:08 2016
New Revision: 308591
URL: https://svnweb.freebsd.org/changeset/base/308591
Log:
MFC r308055: Add vdev_reopening support to vdev_geom.
It allows to avoid extra GEOM providers flapping without significant need.
Since GEOM got resize support, we don't need to reopen provider to get new
size. If provider was orphaned and no longer valid, ZFS should already
know that, and in such case reopen should be done in full as expected.
Modified:
stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Nov 12 23:38:04 2016 (r308590)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Nov 12 23:39:08 2016 (r308591)
@@ -776,7 +776,14 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
return (EINVAL);
}
- vd->vdev_tsd = NULL;
+ /*
+ * Reopen the device if it's not currently open. Otherwise,
+ * just update the physical size of the device.
+ */
+ if ((cp = vd->vdev_tsd) != NULL) {
+ ASSERT(vd->vdev_reopening);
+ goto skip_open;
+ }
DROP_GIANT();
g_topology_lock();
@@ -861,6 +868,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
return (error);
}
+skip_open:
pp = cp->provider;
/*
@@ -896,6 +904,9 @@ static void
vdev_geom_close(vdev_t *vd)
{
+ if (vd->vdev_reopening)
+ return;
+
DROP_GIANT();
g_topology_lock();
vdev_geom_close_locked(vd);
More information about the svn-src-all
mailing list