dm snapshot: avoid allocating exceptions in merge
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 10 Dec 2009 23:52:31 +0000 (23:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:52:31 +0000 (23:52 +0000)
commit3452c2a1eb5b93c1b9fb0d22bd5b07c0cee4dc29
tree65d4af8d6cf36ac4bcc8c226f8be891740d343ee
parent515ad66cc4c82f210d726340349c8f7c1ec6b125
dm snapshot: avoid allocating exceptions in merge

The snapshot-merge target should not allocate new exceptions because the
intent is to merge all of its exceptions as quickly and safely as
possible.

This patch introduces the snapshot-merge mapping function and updates
__origin_write() so that it doesn't allocate exceptions on any snapshots
that are being merged.

If a write request to a merging snapshot device is to be dispatched
directly to the origin (because the chunk is not remapped or was already
merged), snapshot_merge_map() must make exceptions in other snapshots so
calls do_origin().

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-snap.c