dm snapshot: Make exception tables scalable
authorNikos Tsironis <ntsironis@arrikto.com>
Sun, 17 Mar 2019 12:22:57 +0000 (14:22 +0200)
committerMike Snitzer <snitzer@redhat.com>
Thu, 18 Apr 2019 20:18:29 +0000 (16:18 -0400)
commitf79ae415b64c35d9ecca159fe796cf98d2ff9e9c
tree83b3ccd0c5cb27d1b696602c57834d003b8bcc65
parent4ad8d880b6c4497e365fb6fd16bab52e9974a3f6
dm snapshot: Make exception tables scalable

Use list_bl to implement the exception hash tables' buckets. This change
permits concurrent access, to distinct buckets, by multiple threads.

Also, implement helper functions to lock and unlock the exception tables
based on the chunk number of the exception at hand.

We retain the global locking, by means of down_write(), which is
replaced by the next commit.

Still, we must acquire the per-bucket spinlocks when accessing the hash
tables, since list_bl does not allow modification on unlocked lists.

Co-developed-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-exception-store.h
drivers/md/dm-snap.c