svn commit: r188705 - head/sys/geom/part

Marcel Moolenaar marcel at FreeBSD.org
Mon Feb 16 20:12:11 PST 2009


Author: marcel
Date: Tue Feb 17 04:12:10 2009
New Revision: 188705
URL: http://svn.freebsd.org/changeset/base/188705

Log:
  Remove gpt_offset and related code. It was introduced for use
  by the BSD scheme, ended up not to be needed. Remove to avoid
  abuse and to keep the bloat to a minimum.

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

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Tue Feb 17 04:08:08 2009	(r188704)
+++ head/sys/geom/part/g_part.c	Tue Feb 17 04:12:10 2009	(r188705)
@@ -701,14 +701,6 @@ g_part_ctl_create(struct gctl_req *req, 
 	error = g_getattr("PART::depth", cp, &attr);
 	table->gpt_depth = (!error) ? attr + 1 : 0;
 
-	/* If we're nested, get the absolute sector offset on disk. */
-	if (table->gpt_depth) {
-		error = g_getattr("PART::offset", cp, &attr);
-		if (error)
-			goto fail;
-		table->gpt_offset = attr;
-	}
-
 	/*
 	 * Synthesize a disk geometry. Some partitioning schemes
 	 * depend on it and since some file systems need it even
@@ -1488,14 +1480,6 @@ g_part_taste(struct g_class *mp, struct 
 
 	table = gp->softc;
 
-	/* If we're nested, get the absolute sector offset on disk. */
-	if (table->gpt_depth) {
-		error = g_getattr("PART::offset", cp, &attr);
-		if (error)
-			goto fail;
-		table->gpt_offset = attr;
-	}
-
 	/*
 	 * Synthesize a disk geometry. Some partitioning schemes
 	 * depend on it and since some file systems need it even
@@ -1686,9 +1670,6 @@ g_part_start(struct bio *bp)
 			return;
 		if (g_handleattr_int(bp, "PART::depth", table->gpt_depth))
 			return;
-		if (g_handleattr_int(bp, "PART::offset",
-		    table->gpt_offset + entry->gpe_start))
-			return;
 		if (g_handleattr_str(bp, "PART::scheme",
 		    table->gpt_scheme->name))
 			return;

Modified: head/sys/geom/part/g_part.h
==============================================================================
--- head/sys/geom/part/g_part.h	Tue Feb 17 04:08:08 2009	(r188704)
+++ head/sys/geom/part/g_part.h	Tue Feb 17 04:12:10 2009	(r188705)
@@ -104,13 +104,6 @@ struct g_part_table {
 	 */
 	uint32_t	gpt_sectors;
 	uint32_t	gpt_heads;
-	/*
-	 * gpt_offset holds the absolute block address of the scheme
-	 * on disk. Some partitioning schemes (historically) use
-	 * absolute addressing. Relative addresses are obtained by
-	 * subtracting gpt_offset from the absolute addresses.
-	 */
-	uint64_t	gpt_offset;
 
 	int		gpt_depth;	/* Sub-partitioning level. */
 	int		gpt_isleaf:1;	/* Cannot be sub-partitioned. */


More information about the svn-src-head mailing list