linux-next: manual merge of the md tree with the device-mapper tree
From: Stephen Rothwell
Date: Wed Mar 14 2012 - 23:07:54 EST
Hi Neil,
Today's linux-next merge of the md tree got a conflict in
drivers/md/dm-raid.c between commit 43390ddd7f36 ("The dm-raid code
currently fails to create a RAID array if any of the") from the
device-mapper tree and commit 760e35d7e573 ("md: tidy up rdev_for_each
usage") from the md tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
diff --cc drivers/md/dm-raid.c
index f03e423,c5a875d..0000000
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@@ -857,27 -855,11 +857,27 @@@ static int super_validate(struct mddev
static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
{
int ret;
+ unsigned redundancy = 0;
+ struct raid_dev *dev;
- struct md_rdev *rdev, *freshest, *tmp;
+ struct md_rdev *rdev, *freshest;
struct mddev *mddev = &rs->md;
+ switch (rs->raid_type->level) {
+ case 1:
+ redundancy = rs->md.raid_disks - 1;
+ break;
+ case 4:
+ case 5:
+ case 6:
+ redundancy = rs->raid_type->parity_devs;
+ break;
+ default:
+ ti->error = "Unknown RAID type";
+ return -EINVAL;
+ }
+
freshest = NULL;
- rdev_for_each(rdev, tmp, mddev) {
+ rdev_for_each(rdev, mddev) {
if (!rdev->meta_bdev)
continue;
Attachment:
pgp00000.pgp
Description: PGP signature