diff options
author | pjd <pjd@FreeBSD.org> | 2005-04-25 10:41:26 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-04-25 10:41:26 +0000 |
commit | 93f62be898c063e35c5549a8728cb11cdc47374a (patch) | |
tree | 111deebe31241470487f06d5fb2dd5e0169d2e9c /sys/geom/mirror/g_mirror_ctl.c | |
parent | cd218c4d5b7cdae9454cffa7e7eba0090c228767 (diff) | |
download | FreeBSD-src-93f62be898c063e35c5549a8728cb11cdc47374a.zip FreeBSD-src-93f62be898c063e35c5549a8728cb11cdc47374a.tar.gz |
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
Diffstat (limited to 'sys/geom/mirror/g_mirror_ctl.c')
-rw-r--r-- | sys/geom/mirror/g_mirror_ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/mirror/g_mirror_ctl.c b/sys/geom/mirror/g_mirror_ctl.c index 8dc87b6..798139c 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; } |