Date: Tue, 11 May 2010 22:29:00 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r207936 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201005112229.o4BMT08P014538@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@jrv.org> Reported by: Yuri Pankov <yuri.pankov@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005112229.o4BMT08P014538>