summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/virstor
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-05-01 02:24:05 +0000
committerpfg <pfg@FreeBSD.org>2016-05-01 02:24:05 +0000
commit99c72370d143d76721d8a3da55177b362925bac6 (patch)
tree40e161dbc2a5b51098c923f7ba5378838673b0f2 /sbin/geom/class/virstor
parent212ce360b69cebcd06dfe2e5569bd3bbd96fb734 (diff)
downloadFreeBSD-src-99c72370d143d76721d8a3da55177b362925bac6.zip
FreeBSD-src-99c72370d143d76721d8a3da55177b362925bac6.tar.gz
sbin: ake use of our rounddown() macro when sys/param.h is available.
No functional change.
Diffstat (limited to 'sbin/geom/class/virstor')
-rw-r--r--sbin/geom/class/virstor/geom_virstor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/geom/class/virstor/geom_virstor.c b/sbin/geom/class/virstor/geom_virstor.c
index 15a5676..7b83852 100644
--- a/sbin/geom/class/virstor/geom_virstor.c
+++ b/sbin/geom/class/virstor/geom_virstor.c
@@ -255,7 +255,7 @@ virstor_label(struct gctl_req *req)
if (md.md_chunk_size % MAXPHYS != 0) {
/* XXX: This is not strictly needed, but it's convenient to
* impose some limitations on it, so why not MAXPHYS. */
- size_t new_size = (md.md_chunk_size / MAXPHYS) * MAXPHYS;
+ size_t new_size = rounddown(md.md_chunk_size, MAXPHYS);
if (new_size < md.md_chunk_size)
new_size += MAXPHYS;
fprintf(stderr, "Resizing chunk size to be a multiple of "
OpenPOWER on IntegriCloud