summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-07-28 08:03:00 (GMT)
committerIngo Molnar <mingo@kernel.org>2014-07-28 08:03:00 (GMT)
commitca5bc6cd5de5b53eb8fd6fea39aa3fe2a1e8c3d9 (patch)
tree75beaae2d4b6bc654eb28994dd5906d8dcf5ef46 /drivers/md/dm-thin-metadata.c
parentc1221321b7c25b53204447cff9949a6d5a7ddddc (diff)
parentd8d28c8f00e84a72e8bee39a85835635417bee49 (diff)
downloadlinux-ca5bc6cd5de5b53eb8fd6fea39aa3fe2a1e8c3d9.tar.xz
Merge branch 'sched/urgent' into sched/core, to merge fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
-rw-r--r--drivers/md/dm-thin-metadata.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index b086a94..e9d33ad 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -613,6 +613,15 @@ static int __open_metadata(struct dm_pool_metadata *pmd)
disk_super = dm_block_data(sblock);
+ /* Verify the data block size hasn't changed */
+ if (le32_to_cpu(disk_super->data_block_size) != pmd->data_block_size) {
+ DMERR("changing the data block size (from %u to %llu) is not supported",
+ le32_to_cpu(disk_super->data_block_size),
+ (unsigned long long)pmd->data_block_size);
+ r = -EINVAL;
+ goto bad_unlock_sblock;
+ }
+
r = __check_incompat_features(disk_super, pmd);
if (r < 0)
goto bad_unlock_sblock;