dm snapshot: track snapshot reads
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 21 Jul 2008 11:00:32 +0000 (12:00 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Mon, 21 Jul 2008 11:00:32 +0000 (12:00 +0100)
commitcd45daffd1f7b53aac0835b23e97f814ec3f10dc
tree17d35682a8a97f3a73f513531f08ba7e0c8cd718
parentdef052d21c4e77975bb75cf212f018ec913f8e2f
dm snapshot: track snapshot reads

Whenever a snapshot read gets mapped through to the origin, track it in
a per-snapshot hash table indexed by chunk number, using memory allocated
from a new per-snapshot mempool.

We need to track these reads to avoid race conditions which will be fixed
by patches that follow.

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