aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-27 21:31:47 -0400
committerNeilBrown <neilb@suse.de>2011-07-27 21:31:47 -0400
commit9f2f3830789a4c9c1af2d1437d407c43e05136e6 (patch)
tree8e20afbfca82acd7346fb93d35170f44ee01a807 /drivers/md/md.c
parent2699b67223aca6b1450fc2f72e40fada952afc85 (diff)
md: Disable bad blocks and v0.90 metadata.
v0.90 metadata cannot record bad blocks, so when loading metadata for such a device, set shift to -1. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e2ec8bd0fb94..7ae3c5a18001 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1058,6 +1058,7 @@ static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version
1058 rdev->preferred_minor = sb->md_minor; 1058 rdev->preferred_minor = sb->md_minor;
1059 rdev->data_offset = 0; 1059 rdev->data_offset = 0;
1060 rdev->sb_size = MD_SB_BYTES; 1060 rdev->sb_size = MD_SB_BYTES;
1061 rdev->badblocks.shift = -1;
1061 1062
1062 if (sb->level == LEVEL_MULTIPATH) 1063 if (sb->level == LEVEL_MULTIPATH)
1063 rdev->desc_nr = -1; 1064 rdev->desc_nr = -1;
@@ -3004,6 +3005,9 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
3004 goto abort_free; 3005 goto abort_free;
3005 } 3006 }
3006 } 3007 }
3008 if (super_format == -1)
3009 /* hot-add for 0.90, or non-persistent: so no badblocks */
3010 rdev->badblocks.shift = -1;
3007 3011
3008 return rdev; 3012 return rdev;
3009 3013