diff options
author | pjd <pjd@FreeBSD.org> | 2006-10-10 15:00:32 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-10-10 15:00:32 +0000 |
commit | 0c8c135ad5c67d351ddd0d30f8c03255cade078f (patch) | |
tree | 1f926ebb20000b4ec1e2b8743a9458ade378c054 /sbin/geom | |
parent | 1eddb4416c538c990a0b10f0892818dfe1c26d61 (diff) | |
download | FreeBSD-src-0c8c135ad5c67d351ddd0d30f8c03255cade078f.zip FreeBSD-src-0c8c135ad5c67d351ddd0d30f8c03255cade078f.tar.gz |
Be sure to not create devices with (mediasize % sectorsize) != 0.
Reported by: xride
MFC after: 1 week
Diffstat (limited to 'sbin/geom')
-rw-r--r-- | sbin/geom/class/mirror/geom_mirror.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/geom/class/mirror/geom_mirror.c b/sbin/geom/class/mirror/geom_mirror.c index 2f9d5dc..0ace733 100644 --- a/sbin/geom/class/mirror/geom_mirror.c +++ b/sbin/geom/class/mirror/geom_mirror.c @@ -215,6 +215,7 @@ mirror_label(struct gctl_req *req) } md.md_mediasize = mediasize; md.md_sectorsize = sectorsize; + md.md_mediasize -= (md.md_mediasize % md.md_sectorsize); /* * Clear last sector first, to spoil all components if device exists. |