mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
3c978f7bcc
Fix code checking that the 2nd mda which is at the end of disk really fits the available free space and avoid any DA and MDA interleaving when we already have DA preallocated. This mainly applies when we're restoring a PV from VG backup using pvcreate --restorefile where we may already have some DA preallocated - this means the PV was in a VG before with already allocated space from it (the LVs were created). Hence we need to avoid stepping into DA - the MDA can never ever be inside in such case! The code responsible for this calculation was already in _text_pv_add_metadata_area fn, but it had a bug in the calculation where we subtracted one more sector by mistake and then the code could still incorrectly allocate the MDA inside existing DA. The patch also renames the variable in the code so it doesn't confuse us in future. Also, if the 2nd mda doesn't fit, don't silently continue with just 1 MDA (at the start of the disk). If 2nd mda was requested and we can't create that due to unavailable space, error out correctly (the patch also adds a test to shell/pvcreate-operation.sh for this case). |
||
---|---|---|
.. | ||
activate | ||
cache | ||
cache_segtype | ||
commands | ||
config | ||
datastruct | ||
device | ||
display | ||
error | ||
filters | ||
format1 | ||
format_pool | ||
format_text | ||
freeseg | ||
label | ||
locking | ||
log | ||
lvmpolld | ||
metadata | ||
mirror | ||
misc | ||
mm | ||
notify | ||
properties | ||
raid | ||
replicator | ||
report | ||
snapshot | ||
striped | ||
thin | ||
unknown | ||
uuid | ||
zero | ||
Makefile.in |