summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-08-05 03:04:59 +0400
committerDave Airlie <airlied@redhat.com>2014-08-05 03:04:59 +0400
commit5d42f82a9b8c5168d75cf59307cd271feca94464 (patch)
treea7049189a2c814589b3ad7e6e776fb736f980967 /drivers/md/dm-thin-metadata.c
parentc759606c96dc052373d4c36ea383595da46b04e9 (diff)
parent19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff)
downloadlinux-5d42f82a9b8c5168d75cf59307cd271feca94464.tar.xz
Merge tag 'v3.16' into drm-next
Linux 3.16 backmerge requested by i915, nouveau and radeon authors Conflicts: drivers/gpu/drm/i915/i915_gem_render_state.c drivers/gpu/drm/i915/intel_drv.h
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 b086a945edcb..e9d33ad59df5 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;