]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm snapshot: iterate origin and cow devices
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 12 Aug 2010 03:13:50 +0000 (04:13 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:45:55 +0000 (16:45 -0700)
commit72c7a360cd31bef331571fcca735adbeffb250d5
treee3580ba7a09a94b5a64d21c4e86df5256bc0f47b
parent4f2624fb7b37bf8d8b36bb01e2e86939ca049dbc
dm snapshot: iterate origin and cow devices

commit 1e5554c8428bc7209a83e2d07ca724be4d981ce3 upstream.

Iterate both origin and snapshot devices

iterate_devices method should call the callback for all the devices where
the bio may be remapped. Thus, snapshot_iterate_devices should call the callback
for both snapshot and origin underlying devices because it remaps some bios
to the snapshot and some to the origin.

snapshot_iterate_devices called the callback only for the origin device.
This led to badly calculated device limits if snapshot and origin were placed
on different types of disks.

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-snap.c