dm raid: make sure no feature flags are set in metadata
authorHeinz Mauelshagen <heinzm@redhat.com>
Fri, 29 Apr 2016 16:59:56 +0000 (18:59 +0200)
committerMike Snitzer <snitzer@redhat.com>
Fri, 13 May 2016 13:03:51 +0000 (09:03 -0400)
commit4c9971ca6a172e70f52a7f9b6796e843c3f70293
tree67beaa03c6bad723dcc555d507cdb9d4ccb9f902
parent72f6d8d8c9b3592da7109cad3415559864ee9f2d
dm raid: make sure no feature flags are set in metadata

Given we don't yet support any feature flags in the dm-raid ondisk
metadata (see: 'features' member of 'struct dm_raid_superblock'),
add a check to ensure no flags are actually set, if any features are
set reject the activation of the RAID mapping.

This is to prevent possible data corruption in case of a kernel
downgrade when there'll potentially be feature flags set by a future
dm-raid target.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c