From owner-svn-src-head@freebsd.org Tue Apr 12 06:54:20 2016 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 1FC47B0C226; Tue, 12 Apr 2016 06:54:20 +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 E16D215CA; Tue, 12 Apr 2016 06:54:19 +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 u3C6sJ6j079715; Tue, 12 Apr 2016 06:54:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3C6sJTW079714; Tue, 12 Apr 2016 06:54:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201604120654.u3C6sJTW079714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 Apr 2016 06:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297847 - 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.21 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: Tue, 12 Apr 2016 06:54:20 -0000 Author: avg Date: Tue Apr 12 06:54:18 2016 New Revision: 297847 URL: https://svnweb.freebsd.org/changeset/base/297847 Log: Revert r297396 Modify "4958 zdb trips assert on pools with ashift >= 0xe" A better fix is following. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Apr 12 06:46:54 2016 (r297846) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Apr 12 06:54:18 2016 (r297847) @@ -2777,19 +2777,10 @@ zio_vdev_io_start(zio_t *zio) (void) atomic_cas_64(&spa->spa_last_io, old, new); } -#ifdef illumos align = 1ULL << vd->vdev_top->vdev_ashift; if (!(zio->io_flags & ZIO_FLAG_PHYSICAL) && P2PHASE(zio->io_size, align) != 0) { -#else - if (zio->io_flags & ZIO_FLAG_PHYSICAL) - align = 1ULL << vd->vdev_top->vdev_logical_ashift; - else - align = 1ULL << vd->vdev_top->vdev_ashift; - - if (P2PHASE(zio->io_size, align) != 0) { -#endif /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align); char *abuf = NULL; @@ -2805,7 +2796,6 @@ zio_vdev_io_start(zio_t *zio) zio_subblock); } -#ifdef illumos /* * If this is not a physical io, make sure that it is properly aligned * before proceeding. @@ -2821,10 +2811,6 @@ zio_vdev_io_start(zio_t *zio) ASSERT0(P2PHASE(zio->io_offset, SPA_MINBLOCKSIZE)); ASSERT0(P2PHASE(zio->io_size, SPA_MINBLOCKSIZE)); } -#else - ASSERT0(P2PHASE(zio->io_offset, align)); - ASSERT0(P2PHASE(zio->io_size, align)); -#endif VERIFY(zio->io_type == ZIO_TYPE_READ || spa_writeable(spa));