diff options
author | phk <phk@FreeBSD.org> | 2003-04-12 08:41:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-12 08:41:26 +0000 |
commit | b08878d5abe36d30577c54d264a686c834407181 (patch) | |
tree | 70cab99eb5820539898b98912bd153898958a78c /sys/geom | |
parent | e9d1c65d22261411dd6170529ca7f925989dca05 (diff) | |
download | FreeBSD-src-b08878d5abe36d30577c54d264a686c834407181.zip FreeBSD-src-b08878d5abe36d30577c54d264a686c834407181.tar.gz |
Retire the "frontstuff" record keeping, it was no match for the
in-band meta-data of BSD labels and a more complex solution will be needed.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_apple.c | 6 | ||||
-rw-r--r-- | sys/geom/geom_bsd.c | 1 | ||||
-rw-r--r-- | sys/geom/geom_gpt.c | 3 | ||||
-rw-r--r-- | sys/geom/geom_mbr.c | 2 | ||||
-rw-r--r-- | sys/geom/geom_pc98.c | 1 | ||||
-rw-r--r-- | sys/geom/geom_slice.c | 23 | ||||
-rw-r--r-- | sys/geom/geom_slice.h | 2 | ||||
-rw-r--r-- | sys/geom/geom_sunlabel.c | 1 |
8 files changed, 1 insertions, 38 deletions
diff --git a/sys/geom/geom_apple.c b/sys/geom/geom_apple.c index 745470f..c0cbc59 100644 --- a/sys/geom/geom_apple.c +++ b/sys/geom/geom_apple.c @@ -178,12 +178,6 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) if (sectorsize != 512) break; - /* - * Reserve the driver record. XXX Should the partition - * map be included ? - */ - gsp->frontstuff = sectorsize; - buf = g_read_data(cp, 0, sectorsize, &error); if (buf == NULL || error != 0) break; diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index 3dccb88..afef301 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -462,7 +462,6 @@ g_bsd_try(struct g_geom *gp, struct g_slicer *gsp, struct g_consumer *cp, int se /* If we had a label, record it properly. */ if (error == 0) { - gsp->frontstuff = 16 * secsize; /* XXX */ ms->labeloffset = offset; g_topology_lock(); g_slice_conf_hot(gp, 0, offset, g_bsd_ondisk_size()); diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c index d51a824..764e47c 100644 --- a/sys/geom/geom_gpt.c +++ b/sys/geom/geom_gpt.c @@ -209,9 +209,6 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) tblsz = (hdr->hdr_entries * hdr->hdr_entsz + secsz - 1) & ~(secsz - 1); buf = g_read_data(cp, hdr->hdr_lba_table * secsz, tblsz, &error); - - gsp->frontstuff = hdr->hdr_lba_start * secsz; - for (i = 0; i < hdr->hdr_entries; i++) { struct uuid unused = GPT_ENT_TYPE_UNUSED; struct uuid freebsd = GPT_ENT_TYPE_FREEBSD; diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c index 4c81ec7..2663f3e 100644 --- a/sys/geom/geom_mbr.c +++ b/sys/geom/geom_mbr.c @@ -297,7 +297,6 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist) if (sectorsize < 512) break; ms->sectorsize = sectorsize; - gsp->frontstuff = sectorsize * fwsectors; buf = g_read_data(cp, 0, sectorsize, &error); if (buf == NULL || error != 0) break; @@ -404,7 +403,6 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) sectorsize = cp->provider->sectorsize; if (sectorsize != 512) break; - gsp->frontstuff = sectorsize * fwsectors; for (;;) { buf = g_read_data(cp, off, sectorsize, &error); if (buf == NULL || error != 0) diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index 8c5775c..c6ea404 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -328,7 +328,6 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) sectorsize = cp->provider->sectorsize; if (sectorsize < 512) break; - gsp->frontstuff = sectorsize * fwsectors; buf = g_read_data(cp, 0, 8192, &error); if (buf == NULL || error != 0) break; diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 73c5417..882ddb0 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -220,18 +220,6 @@ g_slice_start(struct bio *bp) /* Give the real method a chance to override */ if (gsp->start(bp)) return; - if (!strcmp("GEOM::frontstuff", bp->bio_attribute)) { - t = gsp->cfrontstuff; - if (gsp->frontstuff > t) - t = gsp->frontstuff; - t -= gsl->offset; - if (t < 0) - t = 0; - if (t > gsl->length) - t = gsl->length; - g_handleattr_off_t(bp, "GEOM::frontstuff", t); - return; - } #ifdef _KERNEL if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) { struct g_kerneldump *gkd; @@ -269,10 +257,6 @@ g_slice_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct (uintmax_t)gsp->slices[pp->index].offset); return; } - if (gp != NULL && (pp == NULL && cp == NULL)) { - sbuf_printf(sb, "%s<frontstuff>%ju</frontstuff>\n", - indent, (intmax_t)gsp->frontstuff); - } if (pp != NULL) { sbuf_printf(sb, "%s<index>%u</index>\n", indent, pp->index); sbuf_printf(sb, "%s<length>%ju</length>\n", @@ -400,7 +384,7 @@ g_slice_new(struct g_class *mp, u_int slices, struct g_provider *pp, struct g_co struct g_slicer *gsp; struct g_consumer *cp; void **vp; - int error, i; + int error; g_topology_assert(); vp = (void **)extrap; @@ -426,11 +410,6 @@ g_slice_new(struct g_class *mp, u_int slices, struct g_provider *pp, struct g_co g_destroy_geom(gp); return (NULL); } - /* Find out if there are any magic bytes on the consumer */ - i = sizeof gsp->cfrontstuff; - error = g_io_getattr("GEOM::frontstuff", cp, &i, &gsp->cfrontstuff); - if (error) - gsp->cfrontstuff = 0; *vp = gsp->softc; *cpp = cp; return (gp); diff --git a/sys/geom/geom_slice.h b/sys/geom/geom_slice.h index cc014d4..41ab955 100644 --- a/sys/geom/geom_slice.h +++ b/sys/geom/geom_slice.h @@ -51,8 +51,6 @@ struct g_slicer { u_int nslice; u_int nprovider; u_int nhot; - off_t cfrontstuff; - off_t frontstuff; struct g_slice *slices; struct g_slice *hot; void *softc; diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c index 8becf01..5ceebc8 100644 --- a/sys/geom/geom_sunlabel.c +++ b/sys/geom/geom_sunlabel.c @@ -174,7 +174,6 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags) ms->sectorsize = cp->provider->sectorsize; if (ms->sectorsize < 512) break; - gsp->frontstuff = 16 * ms->sectorsize; mediasize = cp->provider->mediasize; buf = g_read_data(cp, 0, ms->sectorsize, &error); if (buf == NULL || error != 0) |