diff options
author | phk <phk@FreeBSD.org> | 2003-02-11 14:57:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-02-11 14:57:34 +0000 |
commit | fd7ea6d48a7d211946407c3e54e2eb37746d510a (patch) | |
tree | 9134449cbea5212847a4e75800cbaa03b04f0f69 /sys/geom/geom_slice.c | |
parent | b2fb11897013800a76444ffcab5961680ac3f321 (diff) | |
download | FreeBSD-src-fd7ea6d48a7d211946407c3e54e2eb37746d510a.zip FreeBSD-src-fd7ea6d48a7d211946407c3e54e2eb37746d510a.tar.gz |
Better names for struct disk elements: d_maxsize, d_stripeoffset
and d_stripesisze;
Introduce si_stripesize and si_stripeoffset in struct cdev so we
can make the visible to clustering code.
Add stripesize and stripeoffset to providers.
DTRT with stripesize and stripeoffset in various places in GEOM.
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index e0632b3..11f1380 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -291,7 +291,7 @@ g_slice_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct int g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...) { - struct g_provider *pp; + struct g_provider *pp, *pp2; struct g_slicer *gsp; struct g_slice *gsl; va_list ap; @@ -346,8 +346,10 @@ g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length sbuf_vprintf(sb, fmt, ap); sbuf_finish(sb); pp = g_new_providerf(gp, sbuf_data(sb)); - pp->flags = - LIST_FIRST(&gp->consumer)->provider->flags & G_PF_CANDELETE; + pp2 = LIST_FIRST(&gp->consumer)->provider; + pp->flags = pp2->flags & G_PF_CANDELETE; + pp->stripesize = pp2->stripesize; + pp->stripeoffset = (pp2->stripeoffset + offset) % pp->stripesize; if (bootverbose) printf("GEOM: Configure %s, start %jd length %jd end %jd\n", pp->name, (intmax_t)offset, (intmax_t)length, |