summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_bsd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-13 21:31:13 +0000
committerphk <phk@FreeBSD.org>2002-12-13 21:31:13 +0000
commit43d82ce26df81c3c077b619993e4ee9fb6a999c4 (patch)
treec1addbd65ec26f7c65bcbaf2e691d7f1cfa92a26 /sys/geom/geom_bsd.c
parent39fb253bb1358ff4e6ad2deaf867a0f22341574c (diff)
downloadFreeBSD-src-43d82ce26df81c3c077b619993e4ee9fb6a999c4.zip
FreeBSD-src-43d82ce26df81c3c077b619993e4ee9fb6a999c4.tar.gz
Don't interpret the hotspots relative to all slices on a slicer, but
relative to the parent device.
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r--sys/geom/geom_bsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index f44eb76..a711bbc 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -555,6 +555,7 @@ g_bsd_hotwrite(void *arg)
struct bio *bp;
struct g_geom *gp;
struct g_slicer *gsp;
+ struct g_slice *gsl;
struct g_bsd_softc *ms;
struct g_bsd_softc fake;
u_char *p;
@@ -564,7 +565,9 @@ g_bsd_hotwrite(void *arg)
gp = bp->bio_to->geom;
gsp = gp->softc;
ms = gsp->softc;
- p = bp->bio_data + ms->labeloffset - bp->bio_offset;
+ gsl = &gsp->slices[bp->bio_to->index];
+ p = bp->bio_data + ms->labeloffset
+ - (bp->bio_offset + gsl->offset);
g_bsd_ledec_disklabel(p, &fake.ondisk);
ondisk2inram(&fake);
OpenPOWER on IntegriCloud