dm cache: speed up writing of the hint array
authorJoe Thornber <ejt@redhat.com>
Thu, 15 Sep 2016 13:23:46 +0000 (09:23 -0400)
committerMike Snitzer <snitzer@redhat.com>
Thu, 22 Sep 2016 15:15:02 +0000 (11:15 -0400)
commit4e781b498ee5008ede91362d91404a362e7a46b3
tree039f3914f839b455759253fb0395a639a1912dae
parentdd6a77d99859ab963503e67372ed278fe8ceab26
dm cache: speed up writing of the hint array

It's far quicker to always delete the hint array and recreate with
dm_array_new() because we avoid the copying caused by mutation.

Also simplifies the policy interface, replacing the walk_hints() with
the simpler get_hint().

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-metadata.c
drivers/md/dm-cache-policy-cleaner.c
drivers/md/dm-cache-policy-internal.h
drivers/md/dm-cache-policy-smq.c
drivers/md/dm-cache-policy.h