summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_bsd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-27 21:37:11 +0000
committerphk <phk@FreeBSD.org>2002-09-27 21:37:11 +0000
commitbd4b8491399a8df6b7aea34dc30845289f3bc0f8 (patch)
tree02c4bf4995be772bfd0fd8a2f45388a5e079ecb5 /sys/geom/geom_bsd.c
parent577f8b1e73497700b0f10db6cf84bd6db96cd62c (diff)
downloadFreeBSD-src-bd4b8491399a8df6b7aea34dc30845289f3bc0f8.zip
FreeBSD-src-bd4b8491399a8df6b7aea34dc30845289f3bc0f8.tar.gz
Add the new g_slice_config() call, which can add/delete/change a slice,
with support for trying, doing and forcing. This will eventually replace g_slice_addslice() which gets changed from grabbing topology to requing it in this commit as well. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r--sys/geom/geom_bsd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index 6155d42..8c501e8 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -348,10 +348,12 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
if (ppp->p_size == 0)
continue;
npart++;
+ g_topology_lock();
pp2 = g_slice_addslice(gp, i,
((off_t)(ppp->p_offset - ppr->p_offset)) << 9ULL,
((off_t)ppp->p_size) << 9ULL,
"%s%c", pp->name, 'a' + i);
+ g_topology_unlock();
g_error_provider(pp2, 0);
}
ondisk2inram(ms);
@@ -388,8 +390,10 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
dl->d_checksum = 0;
dl->d_checksum = dkcksum(dl);
ms->inram = ms->ondisk;
+ g_topology_lock();
pp2 = g_slice_addslice(gp, RAW_PART,
0, mediasize, "%s%c", pp->name, 'a' + RAW_PART);
+ g_topology_unlock();
g_error_provider(pp2, 0);
npart = 1;
}
OpenPOWER on IntegriCloud