svn commit: r324199 - head/sys/geom

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Oct 2 11:57:02 UTC 2017


Author: trasz
Date: Mon Oct  2 11:57:00 2017
New Revision: 324199
URL: https://svnweb.freebsd.org/changeset/base/324199

Log:
  Clear G_CF_ORPHAN when attaching. This fixes cases where the same
  GEOM consumer can be orphaned, and then reattach to another provider.
  
  From a user point of view, this makes gmountver(4) work again.
  
  Reviewed by:	avg, mav
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D12228

Modified:
  head/sys/geom/geom_subr.c

Modified: head/sys/geom/geom_subr.c
==============================================================================
--- head/sys/geom/geom_subr.c	Mon Oct  2 11:55:11 2017	(r324198)
+++ head/sys/geom/geom_subr.c	Mon Oct  2 11:57:00 2017	(r324199)
@@ -828,6 +828,7 @@ g_attach(struct g_consumer *cp, struct g_provider *pp)
 	g_trace(G_T_TOPOLOGY, "g_attach(%p, %p)", cp, pp);
 	KASSERT(cp->provider == NULL, ("attach but attached"));
 	cp->provider = pp;
+	cp->flags &= ~G_CF_ORPHAN;
 	LIST_INSERT_HEAD(&pp->consumers, cp, consumers);
 	error = redo_rank(cp->geom);
 	if (error) {


More information about the svn-src-head mailing list