svn commit: r207936 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue May 11 22:29:00 UTC 2010
Author: pjd
Date: Tue May 11 22:29:00 2010
New Revision: 207936
URL: http://svn.freebsd.org/changeset/base/207936
Log:
Eventhough r203504 eliminates taste traffic provoked by vdev_geom.c,
ZFS still like to open all vdevs, close them and open them again,
which in turn provokes taste traffic anyway.
I don't know of any clean way to fix it, so do it the hard way - if we can't
open provider for writing just retry 5 times with 0.5 pauses. This should
elimitate accidental races caused by other classes tasting providers created on
top of our vdevs.
MFC after: 3 days
Reported by: James R. Van Artsdalen <james-freebsd-fs2 at jrv.org>
Reported by: Yuri Pankov <yuri.pankov at gmail.com>
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 Tue May 11 22:28:55 2010 (r207935)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 11 22:29:00 2010 (r207936)
@@ -530,8 +530,17 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
error = ENOENT;
} else if (cp->acw == 0 && (spa_mode & FWRITE) != 0) {
+ int i;
+
g_topology_lock();
- error = g_access(cp, 0, 1, 0);
+ for (i = 0; i < 5; i++) {
+ error = g_access(cp, 0, 1, 0);
+ if (error == 0)
+ break;
+ g_topology_unlock();
+ tsleep(vd, 0, "vdev", hz / 2);
+ g_topology_lock();
+ }
if (error != 0) {
printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n",
vd->vdev_path, error);
More information about the svn-src-all
mailing list