Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 00:07:22 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269543 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <53e0203a.53c7.17282657@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Aug  5 00:07:21 2014
New Revision: 269543
URL: http://svnweb.freebsd.org/changeset/base/269543

Log:
  MFV r269542:
  
  In vdev_get_stats, check that the vdev is not a hole before computing the
  fragmentation.  This fixes a panic when removing log device.
  
  Illumos issue:
      5049 panic when removing log device
  
  Author:		Alex Reece <alex@delphix.com>
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Mon Aug  4 23:57:46 2014	(r269542)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c	Tue Aug  5 00:07:21 2014	(r269543)
@@ -2766,8 +2766,9 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t *
 	    ? vd->vdev_top->vdev_ashift : vd->vdev_ashift;
 	vs->vs_logical_ashift = vd->vdev_logical_ashift;
 	vs->vs_physical_ashift = vd->vdev_physical_ashift;
-	if (vd->vdev_aux == NULL && vd == vd->vdev_top)
+	if (vd->vdev_aux == NULL && vd == vd->vdev_top && !vd->vdev_ishole) {
 		vs->vs_fragmentation = vd->vdev_mg->mg_fragmentation;
+	}
 
 	/*
 	 * If we're getting stats on the root vdev, aggregate the I/O counts



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e0203a.53c7.17282657>