diff options
author | trasz <trasz@FreeBSD.org> | 2012-07-07 22:20:47 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2012-07-07 22:20:47 +0000 |
commit | 92879956edeb2994a3a88ed9345acc826a8b02dd (patch) | |
tree | 55385fd39d6a452c38a9277c0e9fa5d8883e37fd /sys/geom/mountver | |
parent | 770bbae61e56e038c7a6ec60dfecfef0b944b547 (diff) | |
download | FreeBSD-src-92879956edeb2994a3a88ed9345acc826a8b02dd.zip FreeBSD-src-92879956edeb2994a3a88ed9345acc826a8b02dd.tar.gz |
Add trivial resize handling to gmountver(8).
Reviewed by: mav
Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/geom/mountver')
-rw-r--r-- | sys/geom/mountver/g_mountver.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/geom/mountver/g_mountver.c b/sys/geom/mountver/g_mountver.c index 37cb924..6858b31 100644 --- a/sys/geom/mountver/g_mountver.c +++ b/sys/geom/mountver/g_mountver.c @@ -59,6 +59,7 @@ static eventhandler_tag g_mountver_pre_sync = NULL; static void g_mountver_queue(struct bio *bp); static void g_mountver_orphan(struct g_consumer *cp); +static void g_mountver_resize(struct g_consumer *cp); static int g_mountver_destroy(struct g_geom *gp, boolean_t force); static g_taste_t g_mountver_taste; static int g_mountver_destroy_geom(struct gctl_req *req, struct g_class *mp, @@ -257,6 +258,7 @@ g_mountver_create(struct gctl_req *req, struct g_class *mp, struct g_provider *p gp->softc = sc; gp->start = g_mountver_start; gp->orphan = g_mountver_orphan; + gp->resize = g_mountver_resize; gp->access = g_mountver_access; gp->dumpconf = g_mountver_dumpconf; @@ -457,6 +459,18 @@ g_mountver_orphan(struct g_consumer *cp) G_MOUNTVER_DEBUG(0, "%s is offline. Mount verification in progress.", sc->sc_provider_name); } +static void +g_mountver_resize(struct g_consumer *cp) +{ + struct g_geom *gp; + struct g_provider *pp; + + gp = cp->geom; + + LIST_FOREACH(pp, &gp->provider, provider) + g_resize_provider(pp, cp->provider->mediasize); +} + static int g_mountver_ident_matches(struct g_geom *gp) { |