Bug 201185 - [patch] geli: don't panic on spoil events
Summary: [patch] geli: don't panic on spoil events
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-geom (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-06-29 01:28 UTC by fullermd
Modified: 2015-07-10 19:28 UTC (History)
1 user (show)

See Also:


Attachments
Patch (613 bytes, patch)
2015-06-29 01:28 UTC, fullermd
no flags Details | Diff
Patch (672 bytes, patch)
2015-07-07 21:01 UTC, fullermd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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