From 93f62be898c063e35c5549a8728cb11cdc47374a Mon Sep 17 00:00:00 2001 From: pjd Date: Mon, 25 Apr 2005 10:41:26 +0000 Subject: [PATCH] Fix provider's size check for 'insert' command. Before this fix one was able to insert one sector too small provider. MFC after: 3 days --- sys/geom/mirror/g_mirror_ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/geom/mirror/g_mirror_ctl.c b/sys/geom/mirror/g_mirror_ctl.c index 8dc87b69f8ad..798139c23eb2 100644 --- a/sys/geom/mirror/g_mirror_ctl.c +++ b/sys/geom/mirror/g_mirror_ctl.c @@ -367,7 +367,8 @@ g_mirror_ctl_insert(struct gctl_req *req, struct g_class *mp) gctl_error(req, "Unknown provider %s.", name); continue; } - if (sc->sc_provider->mediasize > pp->mediasize) { + if (sc->sc_provider->mediasize > + pp->mediasize - pp->sectorsize) { gctl_error(req, "Provider %s too small.", name); continue; }