Bug 201185

Summary: [patch] geli: don't panic on spoil events
Product: Base System Reporter: fullermd
Component: kernAssignee: freebsd-geom (Nobody) <geom>
Status: Closed FIXED    
Severity: Affects Some People CC: pjd
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch
none
Patch none

Description fullermd 2015-06-29 01:28:03 UTC
Created attachment 158142 [details]
Patch

g_eli assumes that GEOM spoil events can't happen, and so calls panic() if they do.  But the assumption is incorrect; x-ref post at https://lists.freebsd.org/pipermail/freebsd-current/2015-June/056193.html (and later continuation on -geom, e.g. https://lists.freebsd.org/pipermail/freebsd-geom/2015-June/006142.html ).

So the event should really be treated like an orphan, which just detaches the device.
Comment 1 fullermd 2015-07-07 21:01:21 UTC
Created attachment 158515 [details]
Patch

Updated patch with requested comment improvement.
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-07-10 19:27:27 UTC
A commit references this bug:

Author: pjd
Date: Fri Jul 10 19:27:20 UTC 2015
New revision: 285363
URL: https://svnweb.freebsd.org/changeset/base/285363

Log:
  Spoil even can happen for some time now even on providers opened exclusively
  (on the media change event). Update GELI to handle that situation.

  PR:		201185
  Submitted by:	Matthew D. Fuller

Changes:
  head/sys/geom/eli/g_eli.c