Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2011 11:45:25 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226880 - head/sys/geom/part
Message-ID:  <201110281145.p9SBjPsJ059146@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri Oct 28 11:45:24 2011
New Revision: 226880
URL: http://svn.freebsd.org/changeset/base/226880

Log:
  Our geom withering function could take some time before geom with its
  providers and consumers will be destroyed.  Before take some actions
  with a geom, check that it is not destroyed at the moment.
  
  Tested by:	nwhitehorn
  MFC after:	1 week

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Fri Oct 28 06:03:38 2011	(r226879)
+++ head/sys/geom/part/g_part.c	Fri Oct 28 11:45:24 2011	(r226880)
@@ -451,6 +451,10 @@ g_part_parm_geom(struct gctl_req *req, c
 		gctl_error(req, "%d %s '%s'", EINVAL, name, gname);
 		return (EINVAL);
 	}
+	if ((gp->flags & G_GEOM_WITHER) != 0) {
+		gctl_error(req, "%d %s", ENXIO, gname);
+		return (ENXIO);
+	}
 	*v = gp;
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110281145.p9SBjPsJ059146>