linux/drivers/md
Mikulas Patocka ae0b7448e9 dm snapshot: fix on disk chunk size validation
Fix some problems seen in the chunk size processing when activating a
pre-existing snapshot.

For a new snapshot, the chunk size can either be supplied by the creator
or a default value can be used.  For an existing snapshot, the
chunk size in the snapshot header on disk should always be used.

If someone attempts to load an existing snapshot and has the 'default
chunk size' option set, the kernel uses its default value even when it
is incorrect for the snapshot being loaded.  This patch ensures the
correct on-disk value is always used.

Secondly, when the code does use the chunk size stored on the disk it is
prudent to revalidate it, so the code can exit cleanly if it got
corrupted as happened in
https://bugzilla.redhat.com/show_bug.cgi?id=461506 .

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-09-04 20:40:43 +01:00
..
raid6test
.gitignore
Kconfig
Makefile
bitmap.c
bitmap.h
dm-bio-record.h
dm-crypt.c
dm-delay.c
dm-exception-store.c dm snapshot: fix on disk chunk size validation 2009-09-04 20:40:43 +01:00
dm-exception-store.h dm exception store: split set_chunk_size 2009-09-04 20:40:41 +01:00
dm-io.c
dm-ioctl.c
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c dm log: userspace add luid to distinguish between concurrent log instances 2009-09-04 20:40:34 +01:00
dm-log-userspace-transfer.c dm log: userspace add luid to distinguish between concurrent log instances 2009-09-04 20:40:34 +01:00
dm-log-userspace-transfer.h dm log: userspace add luid to distinguish between concurrent log instances 2009-09-04 20:40:34 +01:00
dm-log.c
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid1.c dm raid1: do not allow log_failure variable to unset after being set 2009-09-04 20:40:32 +01:00
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c dm snapshot: fix on disk chunk size validation 2009-09-04 20:40:43 +01:00
dm-snap-transient.c
dm-snap.c
dm-stripe.c dm stripe: expose correct io hints 2009-09-04 20:40:25 +01:00
dm-sysfs.c
dm-table.c dm stripe: expose correct io hints 2009-09-04 20:40:25 +01:00
dm-target.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c
dm.h
faulty.c
linear.c
linear.h
md.c
md.h
mktables.c
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c
raid1.h
raid5.c
raid5.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c
raid10.h
unroll.pl