1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Limit alignment to 32bit values

to get the same behavior on 32/64 machines.
This commit is contained in:
Zdenek Kabelac 2012-01-25 21:52:53 +00:00
parent fc5c61df97
commit 1ef10bd81a
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Limit alignment to 32bit values.
Check for correctness of uint64 dev_size value.
Rename origin_only parameter to more generic flag use_layer for lv_info().
Thin pools have segment fields thin_count, zero, transaction_id.

View File

@ -1438,7 +1438,7 @@ int pvcreate_params_validate(struct cmd_context *cmd,
}
pp->data_alignment = arg_uint64_value(cmd, dataalignment_ARG, UINT64_C(0));
if (pp->data_alignment > ULONG_MAX) {
if (pp->data_alignment > UINT32_MAX) {
log_error("Physical volume data alignment is too big.");
return 0;
}
@ -1457,7 +1457,7 @@ int pvcreate_params_validate(struct cmd_context *cmd,
}
pp->data_alignment_offset = arg_uint64_value(cmd, dataalignmentoffset_ARG, UINT64_C(0));
if (pp->data_alignment_offset > ULONG_MAX) {
if (pp->data_alignment_offset > UINT32_MAX) {
log_error("Physical volume data alignment offset is too big.");
return 0;
}