[md PATCH 05/16] md: reject devices with bad blocks and v0.90 metadata.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v0.90 metadata cannot record bad blocks, so if there are any we need
to fail the devices.

Signed-off-by: NeilBrown <neilb@xxxxxxx>
---
 drivers/md/md.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 63b185e..8a888d5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1310,6 +1310,10 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
 
 	sb->this_disk = sb->disks[rdev->desc_nr];
 	sb->sb_csum = calc_sb_csum(sb);
+
+	if (rdev->badblocks.count)
+		/* Cannot record individual bad blocks so... */
+		md_error(mddev, rdev);
 }
 
 /*


--
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


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux