summaryrefslogtreecommitdiff
path: root/drivers/md/dm-cache-policy-internal.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2013-11-08 16:36:17 +0000
committerMike Snitzer <snitzer@redhat.com>2013-11-11 11:37:50 -0500
commit532906aa7f9656209f30f08dfadd328fc1bc6912 (patch)
treed8af8f44e38894c97a0d891152723d5b7184edc5 /drivers/md/dm-cache-policy-internal.h
parent633618e3353f8953e43d989d08302f5dcd51d8be (diff)
dm cache: add remove_cblock method to policy interface
Implement policy_remove_cblock() and add remove_cblock method to the mq policy. These methods will be used by the following cache block invalidation patch which adds the 'invalidate_cblocks' message to the cache core. Also, update some comments in dm-cache-policy.h Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-policy-internal.h')
-rw-r--r--drivers/md/dm-cache-policy-internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-policy-internal.h b/drivers/md/dm-cache-policy-internal.h
index a75f7e7498eb..2256a1f24f73 100644
--- a/drivers/md/dm-cache-policy-internal.h
+++ b/drivers/md/dm-cache-policy-internal.h
@@ -64,6 +64,11 @@ static inline void policy_remove_mapping(struct dm_cache_policy *p, dm_oblock_t
p->remove_mapping(p, oblock);
}
+static inline int policy_remove_cblock(struct dm_cache_policy *p, dm_cblock_t cblock)
+{
+ return p->remove_cblock(p, cblock);
+}
+
static inline void policy_force_mapping(struct dm_cache_policy *p,
dm_oblock_t current_oblock, dm_oblock_t new_oblock)
{