]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm snapshot: test chunk size against both origin and snapshot
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 12 Aug 2010 03:13:51 +0000 (04:13 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:45:55 +0000 (16:45 -0700)
commitd59e0c5a9314ff7d6daf93c3aa680c549d267e46
treebe221ea49b3318a9aa10844e73fde75191b2438e
parent72c7a360cd31bef331571fcca735adbeffb250d5
dm snapshot: test chunk size against both origin and snapshot

commit c24110450650f17f7d3ba4fbe01f01ac5a115456 upstream.

Validate chunk size against both origin and snapshot sector size

Don't allow chunk size smaller than either origin or snapshot logical
sector size. Reading or writing data not aligned to sector size is not
allowed and causes immediate errors.

This requires us to open the origin before initialising the
exception store and to export dm_snap_origin.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-exception-store.c
drivers/md/dm-exception-store.h
drivers/md/dm-snap.c