Neil,
Currently, the device size calculation is not correct when hot-adding
devices to arrays with non-persistent superblocks. Device size is always
calculated as if there were a physical superblock on every device. The
attached simple change to hot_add_disk() fixes the problem.
Thanks,
Paul
--- 2_6_3_rc2/drivers/md/md.c.PRISTINE Mon Feb 23 11:01:57 2004
+++ 2_6_3_rc2/drivers/md/md.c Mon Feb 23 11:29:10 2004
@@ -2365,7 +2365,12 @@ static int hot_add_disk(mddev_t * mddev,
return -EINVAL;
}
- rdev->sb_offset = calc_dev_sboffset(rdev->bdev);
+ if (mddev->persistent)
+ rdev->sb_offset = calc_dev_sboffset(rdev->bdev);
+ else
+ rdev->sb_offset = rdev->bdev->bd_inode->i_size
+ >> BLOCK_SIZE_BITS;
+
size = calc_dev_size(rdev, mddev->chunk_size);
rdev->size = size;