From owner-svn-src-head@freebsd.org Wed Jun 21 08:10:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E6D4D895AA; Wed, 21 Jun 2017 08:10:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0484184A58; Wed, 21 Jun 2017 08:10:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5L8AkhH012598; Wed, 21 Jun 2017 08:10:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L8Ak75012596; Wed, 21 Jun 2017 08:10:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706210810.v5L8Ak75012596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 21 Jun 2017 08:10:46 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 08:10:47 -0000 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 , Trond Endrestøl 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);