From owner-freebsd-geom@FreeBSD.ORG Mon Jun 15 06:01:37 2015 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB32BEEA for ; Mon, 15 Jun 2015 06:01:37 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (thyme.infocus-llc.com [199.15.120.10]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 843DC7E2 for ; Mon, 15 Jun 2015 06:01:37 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id C5B9A37B5CF; Mon, 15 Jun 2015 01:01:29 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3m92944m9Hz2Zn; Mon, 15 Jun 2015 01:01:28 -0500 (CDT) Date: Mon, 15 Jun 2015 01:01:28 -0500 From: "Matthew D. Fuller" To: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino Cc: freebsd-geom@freebsd.org Subject: Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli Message-ID: <20150615060128.GC1733@over-yonder.net> References: <20150613224602.GB1733@over-yonder.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.23-fullermd.4 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.7 at thyme.infocus-llc.com X-Virus-Status: Clean 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: Mon, 15 Jun 2015 06:01:37 -0000 On Sun, Jun 14, 2015 at 08:51:08PM +0200 I heard the voice of José García Juanino, and lo! it spake thus: > > I have tried your patch and works. At least, the laptop does not > panic. But after resume, the geli device is destroyed: Yeah, that's presumably unavoidable, once we reach the point where we're getting the media change event. Of course, in your own case, if you can know that is meaningless, you could just replace that callback with a stub that just returns, but that's hardly a good general idea. But presumably geli should treat that spoil event the same as an orpah, which at least avoids the panic and does the least wrong thing in the circumstances. Since the events DO occur (the code suggests the original thought was that they couldn't), we might as well deal with them as gracefully as possible. The only real "solution" in a general sense to the event happening would be to figure out why the CD/DVD device is throwing a media change event on suspend/resume. I have a sneaking suspicion that it's hard to do anything else (you've been suspended, you don't know what's been done to the drive while you weren't around) though... -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.