diff options
Diffstat (limited to 'drivers/md/dm-cache-metadata.c')
-rw-r--r-- | drivers/md/dm-cache-metadata.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c index 4ead4ba60656..d2899e7eb3aa 100644 --- a/drivers/md/dm-cache-metadata.c +++ b/drivers/md/dm-cache-metadata.c | |||
@@ -425,6 +425,15 @@ static int __open_metadata(struct dm_cache_metadata *cmd) | |||
425 | 425 | ||
426 | disk_super = dm_block_data(sblock); | 426 | disk_super = dm_block_data(sblock); |
427 | 427 | ||
428 | /* Verify the data block size hasn't changed */ | ||
429 | if (le32_to_cpu(disk_super->data_block_size) != cmd->data_block_size) { | ||
430 | DMERR("changing the data block size (from %u to %llu) is not supported", | ||
431 | le32_to_cpu(disk_super->data_block_size), | ||
432 | (unsigned long long)cmd->data_block_size); | ||
433 | r = -EINVAL; | ||
434 | goto bad; | ||
435 | } | ||
436 | |||
428 | r = __check_incompat_features(disk_super, cmd); | 437 | r = __check_incompat_features(disk_super, cmd); |
429 | if (r < 0) | 438 | if (r < 0) |
430 | goto bad; | 439 | goto bad; |