summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2015-02-26 19:45:55 +0000
committerAlasdair G Kergon <agk@redhat.com>2015-02-26 19:45:55 +0000
commitcb727a1cccc1518a2b193c92ad5bff122b9220c9 (patch)
tree04c1da2a50a68b815cc3a4c428cc90e0ed9e515f
parent66d074e913d61bd9e5fa7cc67f25f90b4608b071 (diff)
downloadlvm2-cb727a1cccc1518a2b193c92ad5bff122b9220c9.tar.gz
mirror: Avoid region size compiler warning.
format ‘%u’ expects type ‘unsigned int’, but argument 7 has type ‘uint64_t’
-rw-r--r--lib/metadata/mirror.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index 3f2fa2f89..df910025c 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -193,9 +193,7 @@ uint32_t adjusted_mirror_region_size(uint32_t extent_size, uint32_t extents,
* This code should be removed when the CPG restriction is
* lifted.
*/
- region_min = extents;
- region_min *= extent_size;
- region_min /= CMIRROR_REGION_COUNT_LIMIT;
+ region_min = extents * extent_size / CMIRROR_REGION_COUNT_LIMIT;
region_min_pow2 = 1;
while (region_min_pow2 < region_min)
region_min_pow2 *= 2;
@@ -203,11 +201,11 @@ uint32_t adjusted_mirror_region_size(uint32_t extent_size, uint32_t extents,
if (region_size < region_min_pow2) {
if (internal)
log_print_unless_silent("Increasing mirror region size from %"
- PRIu32 " to %" PRIu32 " sectors.",
+ PRIu32 " to %" PRIu64 " sectors.",
region_size, region_min_pow2);
else
log_verbose("Increasing mirror region size from %"
- PRIu32 " to %" PRIu32 " sectors.",
+ PRIu32 " to %" PRIu64 " sectors.",
region_size, region_min_pow2);
region_size = region_min_pow2;
}