geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli
Matthew D. Fuller
fullermd at over-yonder.net
Thu Jul 2 20:01:18 UTC 2015
On Thu, Jul 02, 2015 at 11:49:10AM +0200 I heard the voice of
Pawel Jakub Dawidek, and lo! it spake thus:
>
> 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?
Sure, you mean replacing the comment saying spoiling can't happen?
Something like:
Index: g_eli.c
===================================================================
--- g_eli.c (revision 285057)
+++ g_eli.c (working copy)
@@ -730,10 +730,10 @@
sc = malloc(sizeof(*sc), M_ELI, M_WAITOK | M_ZERO);
gp->start = 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 = g_eli_orphan_spoil_assert;
+ gp->spoiled = g_eli_orphan;
gp->orphan = g_eli_orphan;
gp->dumpconf = g_eli_dumpconf;
/*
I did leave alone the asserting on both orphan and spoil in
g_eli_read_metadata(). Since that's creating and destroying the
consumer all in one straight-line function, it makes sense to be
"impossible". I s'pose it's possible a race with media change could
cause it to happen, but I'm willing to ignore that for now :)
--
Matthew Fuller (MF4839) | fullermd at over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
More information about the freebsd-geom
mailing list