]> git.baikalelectronics.ru Git - kernel.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)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 12 Aug 2010 03:13:51 +0000 (04:13 +0100)
commitbc6dadabb245dd6ffbc8751889eb4aac951dd6c0
tree8b5bff17f77c995099d93b2b4a32bc306962a0bf
parentd45bc103ff8c58d25399d8b72cdd5915cff0d463
dm snapshot: test chunk size against both origin and snapshot

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.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-exception-store.c
drivers/md/dm-exception-store.h
drivers/md/dm-snap.c