summaryrefslogtreecommitdiffstats
path: root/tools/lvresize.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-03-05 15:05:24 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-03-05 15:05:24 +0000
commitaeaec150c0e521bd724dbcc4896d6da93babfd2a (patch)
tree87dab48c3e31f00315d87cea84ffcbe5a9bc6710 /tools/lvresize.c
parentad5c0b5525c37ce184cac42f3a376b30b14e3364 (diff)
downloadlvm2-aeaec150c0e521bd724dbcc4896d6da93babfd2a.tar.gz
lvm2-aeaec150c0e521bd724dbcc4896d6da93babfd2a.tar.xz
lvm2-aeaec150c0e521bd724dbcc4896d6da93babfd2a.zip
Some more missing supposedly 64bit operations.
Avoid use 32bit math for extent_size.
Diffstat (limited to 'tools/lvresize.c')
-rw-r--r--tools/lvresize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lvresize.c b/tools/lvresize.c
index 200d0897..4b093699 100644
--- a/tools/lvresize.c
+++ b/tools/lvresize.c
@@ -63,7 +63,7 @@ static int _validate_stripesize(struct cmd_context *cmd,
if (!(vg->fid->fmt->features & FMT_SEGMENTS))
log_warn("Varied stripesize not supported. Ignoring.");
- else if (arg_uint_value(cmd, stripesize_ARG, 0) > vg->extent_size * 2) {
+ else if (arg_uint_value(cmd, stripesize_ARG, 0) > (uint64_t) vg->extent_size * 2) {
log_error("Reducing stripe size %s to maximum, "
"physical extent size %s",
display_size(cmd,
@@ -463,7 +463,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
(lp->size % vg->extent_size);
log_print("Rounding up size to full physical extent %s",
- display_size(cmd, (uint64_t) lp->size));
+ display_size(cmd, lp->size));
}
lp->extents = lp->size / vg->extent_size;