aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2013-11-12 12:17:43 -0500
committerMike Snitzer <snitzer@redhat.com>2013-11-12 13:11:09 -0500
commit7b6b2bc98c0303b7f043ad5b35906f833e56308d (patch)
treea1c051a829ec191f4ded87b1e996a03c8c77566a /drivers/md
parent65790ff919e2e07ccb4457415c11075b245d643b (diff)
dm cache: resolve small nits and improve Documentation
Document passthrough mode, cache shrinking, and cache invalidation. Also, use strcasecmp() and hlist_unhashed(). Reported-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-cache-policy-mq.c2
-rw-r--r--drivers/md/dm-cache-target.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
index 7209fab8b8ed..416b7b752a6e 100644
--- a/drivers/md/dm-cache-policy-mq.c
+++ b/drivers/md/dm-cache-policy-mq.c
@@ -310,7 +310,7 @@ static void free_entry(struct entry_pool *ep, struct entry *e)
310static struct entry *epool_find(struct entry_pool *ep, dm_cblock_t cblock) 310static struct entry *epool_find(struct entry_pool *ep, dm_cblock_t cblock)
311{ 311{
312 struct entry *e = ep->entries + from_cblock(cblock); 312 struct entry *e = ep->entries + from_cblock(cblock);
313 return e->hlist.pprev ? e : NULL; 313 return !hlist_unhashed(&e->hlist) ? e : NULL;
314} 314}
315 315
316static bool epool_empty(struct entry_pool *ep) 316static bool epool_empty(struct entry_pool *ep)
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 41e664b474f1..9efcf1059b99 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -3057,7 +3057,7 @@ static int cache_message(struct dm_target *ti, unsigned argc, char **argv)
3057 if (!argc) 3057 if (!argc)
3058 return -EINVAL; 3058 return -EINVAL;
3059 3059
3060 if (!strcmp(argv[0], "invalidate_cblocks")) 3060 if (!strcasecmp(argv[0], "invalidate_cblocks"))
3061 return process_invalidate_cblocks_message(cache, argc - 1, (const char **) argv + 1); 3061 return process_invalidate_cblocks_message(cache, argc - 1, (const char **) argv + 1);
3062 3062
3063 if (argc != 2) 3063 if (argc != 2)