Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 16:21:51 +0000 (UTC)
From:      Steven Hartland <smh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271429 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201409111621.s8BGLpYJ019867@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: smh
Date: Thu Sep 11 16:21:51 2014
New Revision: 271429
URL: http://svnweb.freebsd.org/changeset/base/271429

Log:
  Persist vdev_resilver_txg changes to avoid panic caused by validation
  vs a vdev_resilver_txg value from a previous resilver.
  
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Thu Sep 11 15:36:36 2014	(r271428)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Thu Sep 11 16:21:51 2014	(r271429)
@@ -1951,12 +1951,15 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t t
 
 		/*
 		 * If the vdev was resilvering and no longer has any
-		 * DTLs then reset its resilvering flag.
+		 * DTLs then reset its resilvering flag and dirty
+		 * the top level so that we persist the change.
 		 */
 		if (vd->vdev_resilver_txg != 0 &&
 		    range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0 &&
-		    range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0)
+		    range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) {
 			vd->vdev_resilver_txg = 0;
+			vdev_config_dirty(vd->vdev_top);
+		}
 
 		mutex_exit(&vd->vdev_dtl_lock);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409111621.s8BGLpYJ019867>