dm snapshot: test chunk size against both origin and snapshot
commit1ad88d514b174c63a0e8125fb3ae3b02a92bc323
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 12 Aug 2010 03:13:51 +0000 (12 04:13 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:35 +0000 (26 16:43 -0700)
tree15244937488d4b109e5102e37454abe0d082ef18
parent912fd889a516a688b2153df7f5af87e563b40a5c
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