svn commit: r208890 - stable/8/sys/geom/part

Andrey V. Elsukov ae at FreeBSD.org
Mon Jun 7 10:22:22 UTC 2010


Author: ae
Date: Mon Jun  7 10:22:22 2010
New Revision: 208890
URL: http://svn.freebsd.org/changeset/base/208890

Log:
  MFC r207181:
  
  Re-calculate a geometry when reprobing as well.
  
  PR:		kern/145452
  Reviewed by:	marcel
  Approved by:	kib (mentor)
  Approved by:	re (bz)

Modified:
  stable/8/sys/geom/part/g_part.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/geom/part/g_part.c
==============================================================================
--- stable/8/sys/geom/part/g_part.c	Mon Jun  7 10:10:44 2010	(r208889)
+++ stable/8/sys/geom/part/g_part.c	Mon Jun  7 10:22:22 2010	(r208890)
@@ -1067,6 +1067,15 @@ g_part_ctl_undo(struct gctl_req *req, st
 			return (0);
 		}
 		table = gp->softc;
+
+		/*
+		 * Synthesize a disk geometry. Some partitioning schemes
+		 * depend on it and since some file systems need it even
+		 * when the partitition scheme doesn't, we do it here in
+		 * scheme-independent code.
+		 */
+		pp = cp->provider;
+		g_part_geometry(table, cp, pp->mediasize / pp->sectorsize);
 	}
 
 	error = G_PART_READ(table, cp);


More information about the svn-src-all mailing list