Patch name: md-analyze_sbs-failure-if-bad-superblocks.patch MD's superblock reader function should fail if all superblocks are bad. analyze_sbs should return -EINVAL if the 'freshest'/best superblock cannot be validated. This is especially important to dm-raid.c, as it uses md_run at creation time to validate array transitions. Signed-off-by: Jonathan Brassow <jbrassow@xxxxxxxxxx> Index: linux-2.6/drivers/md/md.c =================================================================== --- linux-2.6.orig/drivers/md/md.c +++ linux-2.6/drivers/md/md.c @@ -2890,9 +2890,9 @@ static int analyze_sbs(mddev_t *mddev) kick_rdev_from_array(rdev); } - - super_types[mddev->major_version]. - validate_super(mddev, freshest); + /* If the freshest superblock available cannot be validated, fail. */ + if (super_types[mddev->major_version].validate_super(mddev, freshest)) + return -EINVAL; i = 0; rdev_for_each(rdev, tmp, mddev) { -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html