mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
This commit is contained in:
parent
65790ff919
commit
7b6b2bc98c
3 changed files with 34 additions and 12 deletions
|
|
@ -310,7 +310,7 @@ static void free_entry(struct entry_pool *ep, struct entry *e)
|
|||
static struct entry *epool_find(struct entry_pool *ep, dm_cblock_t cblock)
|
||||
{
|
||||
struct entry *e = ep->entries + from_cblock(cblock);
|
||||
return e->hlist.pprev ? e : NULL;
|
||||
return !hlist_unhashed(&e->hlist) ? e : NULL;
|
||||
}
|
||||
|
||||
static bool epool_empty(struct entry_pool *ep)
|
||||
|
|
|
|||
|
|
@ -3057,7 +3057,7 @@ static int cache_message(struct dm_target *ti, unsigned argc, char **argv)
|
|||
if (!argc)
|
||||
return -EINVAL;
|
||||
|
||||
if (!strcmp(argv[0], "invalidate_cblocks"))
|
||||
if (!strcasecmp(argv[0], "invalidate_cblocks"))
|
||||
return process_invalidate_cblocks_message(cache, argc - 1, (const char **) argv + 1);
|
||||
|
||||
if (argc != 2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue