mirror of
git://sourceware.org/git/lvm2.git
synced 2025-07-17 00:58:59 +03:00
Code uses target driver version for better estimation of max size of COW device for snapshot. The bug can be tested with this script: VG=vg1 lvremove -f $VG/origin set -e lvcreate -L 2143289344b -n origin $VG lvcreate -n snap -c 8k -L 2304M -s $VG/origin dd if=/dev/zero of=/dev/$VG/snap bs=1M count=2044 oflag=direct The bug happens when these two conditions are met * origin size is divisible by (chunk_size/16) - so that the last metadata area is filled completely * the miscalculated snapshot metadata size is divisible by extent size - so that there is no padding to extent boundary which would otherwise save us Signed-off-by:Mikulas Patocka <mpatocka@redhat.com>