[dm-devel] [PATCH 09/24] dm cache metadata: check the metadata version when reading the superblock
Alasdair G Kergon
agk at redhat.com
Fri Oct 25 17:07:11 UTC 2013
On Thu, Oct 24, 2013 at 02:30:22PM -0400, Mike Snitzer wrote:
> From: Joe Thornber <ejt at redhat.com>
> +++ b/drivers/md/dm-cache-metadata.c
> @@ -20,7 +20,13 @@
> + * defines a range of metadata versions that this module can handle.
> +{
> + uint32_t metadata_version = le32_to_cpu(disk_super->version);
+
> + if (metadata_version < MIN_CACHE_VERSION || metadata_version > MAX_CACHE_VERSION) {
> + DMERR("kernel does not support this version of cache metadata (%u)",
> + metadata_version);
- Also state the range supported?
"Cache metadata version %u found, but only versions between %u and %u supported."
Alasdair
More information about the dm-devel
mailing list