Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2017 08:10:46 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320185 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201706210810.v5L8Ak75012596@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Jun 21 08:10:45 2017
New Revision: 320185
URL: https://svnweb.freebsd.org/changeset/base/320185

Log:
  fix several fallouts from r320156, ZFS ABD import
  
  All of the problems were related to the FreeBSD-only features.
  One was caused by a mismerge in the zfsbootcfg support code.
  All others were in the TRIM support code.
  
  Reported by:	ken,
  		O. Hartmann <ohartmann@walstatt.org>,
  		Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>
  MFC after:	1 week
  X-MFC with:	r320156

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c	Wed Jun 21 06:44:56 2017	(r320184)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c	Wed Jun 21 08:10:45 2017	(r320185)
@@ -279,7 +279,8 @@ vdev_raidz_map_free(raidz_map_t *rm)
 
 	size = 0;
 	for (c = rm->rm_firstdatacol; c < rm->rm_cols; c++) {
-		abd_put(rm->rm_col[c].rc_abd);
+		if (rm->rm_col[c].rc_abd != NULL)
+			abd_put(rm->rm_col[c].rc_abd);
 		size += rm->rm_col[c].rc_size;
 	}
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Wed Jun 21 06:44:56 2017	(r320184)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Wed Jun 21 08:10:45 2017	(r320185)
@@ -347,7 +347,12 @@ zio_push_transform(zio_t *zio, abd_t *data, uint64_t s
 	 * Ensure that anyone expecting this zio to contain a linear ABD isn't
 	 * going to get a nasty surprise when they try to access the data.
 	 */
+#ifdef illumos
 	IMPLY(abd_is_linear(zio->io_abd), abd_is_linear(data));
+#else
+	IMPLY(zio->io_abd != NULL && abd_is_linear(zio->io_abd),
+	    abd_is_linear(data));
+#endif
 
 	zt->zt_orig_abd = zio->io_abd;
 	zt->zt_orig_size = zio->io_size;
@@ -3132,7 +3137,7 @@ zio_vdev_io_start(zio_t *zio)
 	    P2PHASE(zio->io_size, align) != 0) {
 		/* Transform logical writes to be a full physical block size. */
 		uint64_t asize = P2ROUNDUP(zio->io_size, align);
-		abd_t *abuf;
+		abd_t *abuf = NULL;
 		if (zio->io_type == ZIO_TYPE_READ ||
 		    zio->io_type == ZIO_TYPE_WRITE)
 			abuf = abd_alloc_sametype(zio->io_abd, asize);



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