mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Some more missing supposedly 64bit operations.
Avoid use 32bit math for extent_size.
This commit is contained in:
parent
33213a3e8e
commit
61fe203e7d
@ -2,7 +2,7 @@ Version 2.02.95 -
|
||||
================================
|
||||
Try to fit thin pool metadata size into 128MB.
|
||||
Print just warning on thin pool check callback path for failing check.
|
||||
Use 64bit math for verification of thin pool and snapshot chunk size.
|
||||
Always use 64bit math with VG extent_size expression.
|
||||
Validate udev structures in _insert_udev_dir().
|
||||
Scan all devices for lvmetad if 'pvscan --cache' used without device list.
|
||||
Populate lvmcache from lvmetad before displaying PVs in pvscan. (2.02.94)
|
||||
|
@ -1412,7 +1412,7 @@ static char *_add_error_device(struct dev_manager *dm, struct dm_tree *dtree,
|
||||
struct dm_tree_node *node;
|
||||
struct lv_segment *seg_i;
|
||||
int segno = -1, i = 0;
|
||||
uint64_t size = seg->len * seg->lv->vg->extent_size;
|
||||
uint64_t size = (uint64_t) seg->len * seg->lv->vg->extent_size;
|
||||
|
||||
dm_list_iterate_items(seg_i, &seg->lv->segments) {
|
||||
if (seg == seg_i)
|
||||
|
@ -3768,7 +3768,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
|
||||
/* add the new segment to the layer LV */
|
||||
dm_list_add(&lv_where->segments, &mapseg->list);
|
||||
lv_where->le_count = layer_lv->le_count;
|
||||
lv_where->size = lv_where->le_count * lv_where->vg->extent_size;
|
||||
lv_where->size = (uint64_t) lv_where->le_count * lv_where->vg->extent_size;
|
||||
|
||||
return layer_lv;
|
||||
}
|
||||
@ -3810,7 +3810,7 @@ static int _extend_layer_lv_for_segment(struct logical_volume *layer_lv,
|
||||
/* add the new segment to the layer LV */
|
||||
dm_list_add(&layer_lv->segments, &mapseg->list);
|
||||
layer_lv->le_count += seg->area_len;
|
||||
layer_lv->size += seg->area_len * layer_lv->vg->extent_size;
|
||||
layer_lv->size += (uint64_t) seg->area_len * layer_lv->vg->extent_size;
|
||||
|
||||
/* map the original area to the new segment */
|
||||
if (!set_lv_segment_area_lv(seg, s, layer_lv, mapseg->le, 0))
|
||||
|
@ -210,7 +210,7 @@ int release_pv_segment(struct pv_segment *peg, uint32_t area_reduction)
|
||||
dev_discard_max_bytes(peg->pv->fmt->cmd->sysfs_dir, peg->pv->dev) &&
|
||||
dev_discard_granularity(peg->pv->fmt->cmd->sysfs_dir, peg->pv->dev)) {
|
||||
discard_offset_sectors = (peg->pe + peg->lvseg->area_len - area_reduction) *
|
||||
peg->pv->vg->extent_size + pe_start;
|
||||
(uint64_t) peg->pv->vg->extent_size + pe_start;
|
||||
if (!discard_offset_sectors) {
|
||||
/*
|
||||
* pe_start=0 and the PV's first extent contains the label.
|
||||
@ -223,7 +223,7 @@ int release_pv_segment(struct pv_segment *peg, uint32_t area_reduction)
|
||||
discard_area_reduction, discard_offset_sectors, dev_name(peg->pv->dev));
|
||||
if (discard_area_reduction &&
|
||||
!dev_discard_blocks(peg->pv->dev, discard_offset_sectors << SECTOR_SHIFT,
|
||||
discard_area_reduction * peg->pv->vg->extent_size * SECTOR_SIZE))
|
||||
discard_area_reduction * (uint64_t) peg->pv->vg->extent_size * SECTOR_SIZE))
|
||||
return_0;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user