Author: marcel
Date: Sun Apr 25 01:56:39 2010
New Revision: 207181
URL: http://svn.freebsd.org/changeset/base/207181

Log:
  Re-calculate a geometry when reprobing as well.
  
  PR:           kern/145452
  Reported by:  "Andrey V. Elsukov" <bu7c...@yandex.ru>

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

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c Sun Apr 25 01:56:31 2010        (r207180)
+++ head/sys/geom/part/g_part.c Sun Apr 25 01:56:39 2010        (r207181)
@@ -1166,6 +1166,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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to