From owner-freebsd-geom@freebsd.org Fri Jul 10 19:29:07 2015 Return-Path: Delivered-To: freebsd-geom@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 DB214997835 for ; Fri, 10 Jul 2015 19:29:06 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 98EC6614 for ; Fri, 10 Jul 2015 19:29:05 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from localhost (unknown [91.206.210.19]) by mail.dawidek.net (Postfix) with ESMTPSA id 774B3FB9; Fri, 10 Jul 2015 21:28:57 +0200 (CEST) Date: Fri, 10 Jul 2015 21:30:19 +0200 From: Pawel Jakub Dawidek To: "Matthew D. Fuller" Cc: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino , freebsd-geom@freebsd.org Subject: Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli Message-ID: <20150710193018.GA1270@garage.freebsd.pl> References: <20150613224602.GB1733@over-yonder.net> <20150615060128.GC1733@over-yonder.net> <20150629013011.GN50491@over-yonder.net> <20150701154233.GA1456@garage.freebsd.pl> <20150701193027.GT50491@over-yonder.net> <20150702094909.GA1186@garage.freebsd.pl> <20150702200109.GC50491@over-yonder.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <20150702200109.GC50491@over-yonder.net> X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 19:29:07 -0000 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 02, 2015 at 03:01:09PM -0500, Matthew D. Fuller wrote: > On Thu, Jul 02, 2015 at 11:49:10AM +0200 I heard the voice of > Pawel Jakub Dawidek, and lo! it spake thus: > >=20 > > With g_media_changed() we can get spoil event even if we hold > > provider exclusively open. Your patch, Matthew, is correct, but > > could you also update the comment there to take into account > > g_media_changed() addition? >=20 > Sure, you mean replacing the comment saying spoiling can't happen? > Something like: >=20 > Index: g_eli.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- g_eli.c (revision 285057) > +++ g_eli.c (working copy) > @@ -730,10 +730,10 @@ > sc =3D malloc(sizeof(*sc), M_ELI, M_WAITOK | M_ZERO); > gp->start =3D g_eli_start; > /* > - * Spoiling cannot happen actually, because we keep provider open for > - * writing all the time or provider is read-only. > + * Spoiling can happen even though we have the provider open > + * exclusively, e.g. through media change events. > */ > - gp->spoiled =3D g_eli_orphan_spoil_assert; > + gp->spoiled =3D g_eli_orphan; > gp->orphan =3D g_eli_orphan; > gp->dumpconf =3D g_eli_dumpconf; > /* Committed, thanks! --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVoB1KAAoJEJVLhSuxKFt1VHIQAKLkkjO10kTMFXOW9aX9bMW9 OhCHKsJbk9a5+mlD9oXfaDVgv2ZcA67w8RejaVZ9EuNO6ArGZUiRcjxgh8AdFFAA H0NlGZcqvvYtNXrHISY2/DjWIVlIK2QK1IfjAis+vWSwztDmHTrWZLN0rzCNqtkb SEw4asXc20doMJMcNM8qAch/XeT6ZIz2pJm4VGi9Hw+68RWfyjudb2XZUCYy+o0U HHmtuThDyG2Hu9bo3QgtXtuwXGmSxGHUT0SR9VMhywNXtOFEmRrYYljROMy20a++ 34BHZzmPCG06jrQ+h3hpB/M77NCQKOqSfsNsiDhbwXtFNbpIvBrCvsJScImQy4sJ XsV7kgMmCdkWRbO+Bhl9awPd6pRRAye77/zbCcJG3jbgzDTd0HjFq5+BVWC99A56 60XLIbiBqhXkKhfJyeuMdXg8Tb/5VFKZZAsqbaRfupMvHAT9stvT9lJiOqHZ/vV5 o2KDpwDjNBPQXpklZNia7IYUDi7wfbdv+YRC8MTnmbi9DkXJ5QgjQXLy2Kmlpsfc aSg69wUiXecCe7tI16n/6/aS7+Wh97AJMrTX2tR04ezToES2mYWVNRinrx15HRUl wbHPEaeBzBjPAS5oxWhfOiPhypRje+TSIFZ10LpI9ZkHdPldHWSXvmOqIMScHIwK /Fg/FvyYtmriD7lb2guj =6sFX -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK--