Re: RAID10 overwrites partition tables

From: Neil Brown
Date: Fri Nov 26 2004 - 19:15:05 EST


On Friday November 26, member@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> mdadm --level 10 does not seem to respect disk partition boundaries.

Hmmm, yes, thanks.

I think the following should fix the bug. It only affects 'resync'
not normal IO or recovery (after a drive has failed).

(I only tested it on whole-drives....)

Please let me know if it helps.

NeilBrown


----------- Diffstat output ------------
./drivers/md/raid10.c | 1 +
1 files changed, 1 insertion(+)

diff ./drivers/md/raid10.c~current~ ./drivers/md/raid10.c
--- ./drivers/md/raid10.c~current~ 2004-11-16 16:33:50.000000000 +1100
+++ ./drivers/md/raid10.c 2004-11-27 11:00:06.000000000 +1100
@@ -1150,6 +1150,7 @@ static void sync_request_write(mddev_t *
md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9);

tbio->bi_sector += conf->mirrors[d].rdev->data_offset;
+ tbio->bi_bdev = conf->mirrors[d].rdev->bdev;
generic_make_request(tbio);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/