dm snapshot: create function for chunk_is_tracked wait
authorMike Snitzer <snitzer@redhat.com>
Thu, 10 Dec 2009 23:52:29 +0000 (23:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:52:29 +0000 (23:52 +0000)
commit615d1eb9cad9b34ed17c18c604254e8db533ac6f
tree0937db148422cad3057db39ec2eaecf7b87e21a9
parent9eaae8ffbc340fc034fed1e5d0dc9ca0e943f817
dm snapshot: create function for chunk_is_tracked wait

Move the __chunk_is_tracked() loop into a separate function as we will
also need to call it from the write path in the rare case of conflicting
writes to the same chunk.

Originally introduced in commit a8d41b59f3f5a7ac19452ef442a7fc1b5fa17366
("dm snapshot: fix race during exception creation").

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