Re: Re: fr1-2.16 patch for 2.6.10 kernel
"Peter T. Breuer" <[email protected]>
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
"Also sprach denis bonnenfant:"
> > mdadm -C -l 1 -n 2 -x 0 /dev/md0 /dev/loop{0,1}
> >
> > ??
> OK, just the time to reboot...
>
> well... It doesn't oops !!!!!!!! really strange ....
>
Anyway, in raid1_add_disk, let's try and make it at least forbid
choosing to readd a disk that is without a bdev, but allow it if we
don't have a bdev at the moment and the disk we want to add does ...
(raid1.c)
#ifdef CONFIG_MD_FR1
/*
* allow a disk which has only been set faulty but not
* removed yet to be reinserted, thus triggering a hot
* repair.
*/
if ( !(p=conf->mirrors+mirror)->rdev
|| p->rdev == rdev
+ || !p->rdev->bdev
|| p->rdev->bdev->bd_inode->i_rdev == rdev->bdev->bd_inode->i_rdev) {
- if (!p->rdev)
p->rdev = rdev;
#else
if ( !(p=conf->mirrors+mirror)->rdev) {
p->rdev = rdev;
#endif /* CONFIG_MD_FR1 */
We are trying to add the disk back into the space in the array it recently
vacated. So we have to recognize a space.
It appears the test for the appropriate space assumed too much about
the quantity of data left engraved in the space. p->rdev->bdev
apparently is sometimes erased, so its attributes cannot be tested.
Maybe the above will help. Maybe it won't.
Peter