diff options
author | Mike Snitzer <snitzer@redhat.com> | 2013-03-20 18:21:27 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-03-20 18:21:27 +0100 |
commit | 4e7f506f6429636115e2f58f9f97089acc62524a (patch) | |
tree | 8758ebd6ee210ec303b661df775f31b3e9f45dd9 /drivers/md/dm-cache-policy.c | |
parent | dm cache: fix race in writethrough implementation (diff) | |
download | linux-4e7f506f6429636115e2f58f9f97089acc62524a.tar.xz linux-4e7f506f6429636115e2f58f9f97089acc62524a.zip |
dm cache: policy change version from string to integer set
Separate dm cache policy version string into 3 unsigned numbers
corresponding to major, minor and patchlevel and store them at the end
of the on-disk metadata so we know which version of the policy generated
the hints in case a future version wants to use them differently.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-policy.c')
-rw-r--r-- | drivers/md/dm-cache-policy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-policy.c b/drivers/md/dm-cache-policy.c index 2cbf5fdaac52..21c03c570c06 100644 --- a/drivers/md/dm-cache-policy.c +++ b/drivers/md/dm-cache-policy.c @@ -150,6 +150,14 @@ const char *dm_cache_policy_get_name(struct dm_cache_policy *p) } EXPORT_SYMBOL_GPL(dm_cache_policy_get_name); +const unsigned *dm_cache_policy_get_version(struct dm_cache_policy *p) +{ + struct dm_cache_policy_type *t = p->private; + + return t->version; +} +EXPORT_SYMBOL_GPL(dm_cache_policy_get_version); + size_t dm_cache_policy_get_hint_size(struct dm_cache_policy *p) { struct dm_cache_policy_type *t = p->private; |