From 2e68c4e6caad9fdadc1cef8b6cb9569192e8a42b Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Wed, 15 Jan 2014 21:06:55 -0500 Subject: dm cache: add policy name to status output The cache's policy may have been established using the "default" alias, which is currently the "mq" policy but the default policy may change in the future. It is useful to know exactly which policy is being used. Add a 'real' member to the dm_cache_policy_type structure and have the "default" dm_cache_policy_type point to the real "mq" dm_cache_policy_type. Update dm_cache_policy_get_name() to check if real is set, if so report the name of the real policy (not the alias). Requested-by: Jonathan Brassow Signed-off-by: Mike Snitzer --- Documentation/device-mapper/cache.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation/device-mapper') diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt index 63fd7cfa4cf1..e6b72d355151 100644 --- a/Documentation/device-mapper/cache.txt +++ b/Documentation/device-mapper/cache.txt @@ -221,7 +221,7 @@ Status <#used cache blocks>/<#total cache blocks> <#read hits> <#read misses> <#write hits> <#write misses> <#demotions> <#promotions> <#dirty> <#features> * -<#core args> * <#policy args> * +<#core args> * <#policy args> * metadata block size : Fixed block size for each metadata block in sectors @@ -250,6 +250,7 @@ feature args : 'writethrough' (optional) #core args : Number of core arguments (must be even) core args : Key/value pairs for tuning the core e.g. migration_threshold +policy name : Name of the policy #policy args : Number of policy arguments to follow (must be even) policy args : Key/value pairs e.g. sequential_threshold -- cgit v1.2.3-59-g8ed1b