dm snapshot: trigger exceptions in remaining snapshots during merge
commit73dfd078cf8bfee4018fb22f1e2a24f2e05b69dc
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 10 Dec 2009 23:52:34 +0000 (10 23:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:52:34 +0000 (10 23:52 +0000)
treee5cc81262315df5c44d13d5a2eb731cfe7f8ea86
parent17aa03326d40614db94bc51fbbc92df628a5c97c
dm snapshot: trigger exceptions in remaining snapshots during merge

When there is one merging snapshot and other non-merging snapshots,
snapshot_merge_process() must make exceptions in the non-merging
snapshots.

Use a sequence count to resolve the race between I/O to chunks that are
about to be merged.  The count increases each time an exception
reallocation finishes.  Use wait_event() to wait until the count
changes.

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