From owner-svn-src-head@freebsd.org Thu Nov 30 15:29:48 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 E62B1E5E7A0 for ; Thu, 30 Nov 2017 15:29:48 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9F9682E1 for ; Thu, 30 Nov 2017 15:29:48 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x241.google.com with SMTP id x20so8364484lff.1 for ; Thu, 30 Nov 2017 07:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:cc; bh=YlWYE5uOiI8qcypKGBS6y0by61X6+5pdPb0DYcRkjoI=; b=N72KBcXy6lkl3CM1PYHgDF0OKVRDBRL9c8WuLDAeoh3CrQTKkvcIeKFbnEKi/YBMre rRinL9qGrdsB7F7rY7bN6Vmk7rwNB6IlJWdLJVol36HbKwDSVBgAnGWJQME7OYRgMATP GciUbw4EmOvogJT3a+wrbqQBV48kxCm5RVwlWNBXomV5tAsMPA2dvUU6bU3Ai+Yp1ou4 3NyDOtDDwISuh6jX7XNqT5GOGICaqeKKVqfWWcmFNZ/v3ebvFNf1e9Xey4Siih6chj16 Pfgg1Mur7LtWcHnuBBiY95pRVZ/vqhCikLLxu6Xld+OUVGUQIw5chXHszrqYcdpqs+w9 w/Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:cc; bh=YlWYE5uOiI8qcypKGBS6y0by61X6+5pdPb0DYcRkjoI=; b=HWsWKFQbP3cd7WqBLflHKRvGJ3e9ZNgEjU14hkuQOxOx9HT2O3MKLGC/ZUC+n1kwkV SNvEcmcGfh3tFRM6SLyvlJqFzIt+J8s7G9igk65F+/8CwhhG/YfhqGP+P8ALcZ6LRvTt zg59xFEVXDCbaXeXN5RE5ECYkWPiYVmCXn5k3VZDUKlkEO6BZ9hzrLPdt0Q7kUbewuXm N28k4kiJvSUw3nYPSJPGjRn1FHGJRXIi7pyNs6FhKjoL7lD08QlcBVZdNFTC0CkR88u9 mWMZn8u48dmuVwN3s1gk3XpCl65i3XyqxhS9Aqk+LQqM+B+WEhWcsgVzBBYrc3skUQdY BpoQ== X-Gm-Message-State: AJaThX69ZEaZ3mPiJCTf6gxqKlWDtxqUhfJ/01PG33YpFelRkDBdBnza thcf4ZETs2vCmLeamxs6qL+YORfBlUOMeRVXOSQ= X-Received: by 10.46.31.18 with SMTP id f18mt3621832ljf.123.1512055786248; Thu, 30 Nov 2017 07:29:46 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Thu, 30 Nov 2017 07:29:45 -0800 (PST) In-Reply-To: <201711301528.vAUFSTO3062941@repo.freebsd.org> References: <201711301528.vAUFSTO3062941@repo.freebsd.org> From: Alan Somers Date: Thu, 30 Nov 2017 08:29:45 -0700 X-Google-Sender-Auth: sKFLCGvIftp6cFywxoyVune9V7Y Message-ID: Subject: Re: svn commit: r326399 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 30 Nov 2017 15:29:49 -0000 Crap. Committed the wrong file. Fix coming shortly. On Thu, Nov 30, 2017 at 8:28 AM, Alan Somers wrote: > Author: asomers > Date: Thu Nov 30 15:28:29 2017 > New Revision: 326399 > URL: https://svnweb.freebsd.org/changeset/base/326399 > > Log: > Fix assertion when ZFS fails to open certain devices > > "panic: vdev_geom_close_locked: cp->private is NULL" > This panic will result if ZFS fails to open a device due to either of the > following reasons: > > 1) The device's sector size is greater than 8KB. > 2) ZFS wants to open the device RW, but it can't be opened for writing. > > The solution is to change the initialization order to ensure that the > assertion will be satisfied. > > PR: 221066 > Reported by: David NewHamlet > Reviewed by: avg > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > Differential Revision: https://reviews.freebsd.org/D13278 > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.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 Thu Nov 30 15:10:11 2017 (r326398) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Thu Nov 30 15:28:29 2017 (r326399) > @@ -2398,7 +2398,7 @@ vdev_raidz_io_done(zio_t *zio) > */ > if (parity_errors + parity_untried < > rm->rm_firstdatacol || > - (zio->io_flags & ZIO_FLAG_RESILVER)) { > + (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB))) { > n = raidz_parity_verify(zio, rm); > unexpected_errors += n; > ASSERT(parity_errors + n <= > @@ -2450,7 +2450,7 @@ vdev_raidz_io_done(zio_t *zio) > * out to failed devices later. > */ > if (parity_errors < rm->rm_firstdatacol - n || > - (zio->io_flags & ZIO_FLAG_RESILVER)) { > + (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB))) { > n = raidz_parity_verify(zio, rm); > unexpected_errors += n; > ASSERT(parity_errors + n <= > @@ -2552,7 +2552,8 @@ done: > zio_checksum_verified(zio); > > if (zio->io_error == 0 && spa_writeable(zio->io_spa) && > - (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER))) { > + (unexpected_errors || > + (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB)))) { > /* > * Use the good data we have in hand to repair damaged children. > */ >