From owner-svn-src-stable@freebsd.org Tue Nov 14 17:54:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6823DD947A; Tue, 14 Nov 2017 17:54:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8B886838B; Tue, 14 Nov 2017 17:54:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEHs0gI068691; Tue, 14 Nov 2017 17:54:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHs0PJ068690; Tue, 14 Nov 2017 17:54:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141754.vAEHs0PJ068690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325818 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 325818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:54:02 -0000 Author: trasz Date: Tue Nov 14 17:54:00 2017 New Revision: 325818 URL: https://svnweb.freebsd.org/changeset/base/325818 Log: MFC r324199: 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. Modified: stable/11/sys/geom/geom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_subr.c ============================================================================== --- stable/11/sys/geom/geom_subr.c Tue Nov 14 17:46:37 2017 (r325817) +++ stable/11/sys/geom/geom_subr.c Tue Nov 14 17:54:00 2017 (r325818) @@ -816,6 +816,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) {