summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-policy-cleaner.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2016-09-15 09:23:46 -0400
committerMike Snitzer <snitzer@redhat.com>2016-09-22 11:15:02 -0400
commit4e781b498ee5008ede91362d91404a362e7a46b3 (patch)
tree039f3914f839b455759253fb0395a639a1912dae /drivers/md/dm-cache-policy-cleaner.c
parentdd6a77d99859ab963503e67372ed278fe8ceab26 (diff)
downloadlinux-4e781b498ee5008ede91362d91404a362e7a46b3.tar.bz2
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>
Diffstat (limited to 'drivers/md/dm-cache-policy-cleaner.c')
-rw-r--r--drivers/md/dm-cache-policy-cleaner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-cache-policy-cleaner.c b/drivers/md/dm-cache-policy-cleaner.c
index 14aaaf059f06..2e8a8f1d8358 100644
--- a/drivers/md/dm-cache-policy-cleaner.c
+++ b/drivers/md/dm-cache-policy-cleaner.c
@@ -395,7 +395,7 @@ static void init_policy_functions(struct policy *p)
p->policy.set_dirty = wb_set_dirty;
p->policy.clear_dirty = wb_clear_dirty;
p->policy.load_mapping = wb_load_mapping;
- p->policy.walk_mappings = NULL;
+ p->policy.get_hint = NULL;
p->policy.remove_mapping = wb_remove_mapping;
p->policy.writeback_work = wb_writeback_work;
p->policy.force_mapping = wb_force_mapping;