mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
args: do not accept >=16EiB sizes
Instead of seeing wierd overflows inside the lvm code, giving false error messages, kill the user experiment in the begining. Who needs to use more then 16EiB with lvm2 and 64bit anyway...
This commit is contained in:
parent
c5c452a137
commit
99f0483580
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Do not accept size parameters bigger then 16EiB.
|
||||
Fix release of PV's fid in free_pv_fid().
|
||||
Skip monitoring of snapshots that are already bigger then origin.
|
||||
Add lv_is_cow_covering_origin() to check if cow covers origin size.
|
||||
|
@ -340,6 +340,10 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)), struct arg
|
||||
} else
|
||||
v *= factor;
|
||||
|
||||
if ((uint64_t) v >= (UINT64_MAX >> SECTOR_SHIFT)) {
|
||||
log_error("Size is too big (>=16EiB).");
|
||||
return 0;
|
||||
}
|
||||
av->i_value = (int32_t) v;
|
||||
av->ui_value = (uint32_t) v;
|
||||
av->i64_value = (int64_t) v;
|
||||
|
Loading…
Reference in New Issue
Block a user