diff options
author | Mike Snitzer <snitzer@redhat.com> | 2013-03-20 17:21:28 +0000 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-03-20 17:21:28 +0000 |
commit | ea2dd8c1ed0becee9812cf0840a9cd553ed398fe (patch) | |
tree | 938398729161784ad0157dc94edaed1f9e9792a3 /drivers/md/dm-cache-target.c | |
parent | 4e7f506f6429636115e2f58f9f97089acc62524a (diff) | |
download | linux-ea2dd8c1ed0becee9812cf0840a9cd553ed398fe.tar.bz2 |
dm cache: policy ignore hints if generated by different version
When reading the dm cache metadata from disk, ignore the policy hints
unless they were generated by the same major version number of the same
policy module.
The hints are considered to be private data belonging to the specific
module that generated them and there is no requirement for them to make
sense to different versions of the policy that generated them.
Policy modules are all required to work fine if no previous hints are
supplied (or if existing hints are lost).
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-target.c')
-rw-r--r-- | drivers/md/dm-cache-target.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index ff267db60025..66120bd46d15 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -2369,8 +2369,7 @@ static int cache_preresume(struct dm_target *ti) } if (!cache->loaded_mappings) { - r = dm_cache_load_mappings(cache->cmd, - dm_cache_policy_get_name(cache->policy), + r = dm_cache_load_mappings(cache->cmd, cache->policy, load_mapping, cache); if (r) { DMERR("could not load cache mappings"); |