1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/test
Zdenek Kabelac 40e6176d25 snapshots: fix incorrect calculation of cow size
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>
2014-02-26 14:25:09 +01:00
..
api tests: check for python before other tests 2014-02-24 21:13:36 +01:00
lib tests: drop mirror from filter 2014-02-24 21:13:36 +01:00
shell snapshots: fix incorrect calculation of cow size 2014-02-26 14:25:09 +01:00
unit makefiles: cleanup update 2013-06-04 15:57:18 +02:00
.gitignore gitignore: Remove redundant test dir entry 2012-06-08 23:34:15 +01:00
Makefile.in test: Turn check_full into check_system complementary with normal check. 2013-12-15 17:26:28 +01:00