Re: Re: fr1-2.16 patch for 2.6.10 kernel

denis bonnenfant <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Peter T. Breuer a écrit :
> "Also sprach denis bonnenfant:"
> 
>>>>#ifdef CONFIG_MD_RAID1_ROBUST_READ
>>>>       mdk_rdev_t *rdev = *rdevp;
>>>>#endif /* CONFIG_MD_RAID1_READ_WRITE_CORRECT */
>>>
>>>
>>>Sure. No problem. I'm worried about the warnings, though! There should
>>>be none.
>>
>>Thanks for your comments, I'm going to work on it this afternoon
> 
> 
> Did you make any progress? I've just taken a look at 2.6.10 out of
> curiousity, and the map() call that told the raid1d thread which disk
> to use next has been replaced by a call to read_balance():
> 
> -                   bio = r1_bio->bios[r1_bio->read_disk];
> -                   if ((disk=map(mddev, &rdev)) == -1) {
> -                           printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
> +                   bio = r1_bio->bios[r1_bio->read_disk];
> +                   if ((disk=read_balance(conf, r1_bio)) == -1) {
> +                           printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
> 
> 
> Now I think the easiest thing to do would be to back out this new
> conflation of functionalities and go back to calling "map" here instead
> of "read_balance". Who cares about that balance stuff since it looks
> pretty whacko to me anyway and we're doing the raid1d thread in the
> background at low priority anyhow.
> 
> However I don't think we have rdev at this point in the new code, so we
> can't just call map(mddev, &rdev) ... grr, but neither did we in the
> original patch, so that patch needs patching. How the heck did we ever
> get the original disk? Anyway,we can get it for the moment as
> 
>    rdev = conf->mirrors[r1_bio->read_disk].rdev;
> 
> and then call map:
> 
>    bio = r1_bio->bios[r1_bio->read_disk];
>    if ((disk=map(mddev, &rdev)) == -1) {
>          printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
> 
> so that looks fixed.

Sorry for the delay, i was on holidays. Lots of snow!

I'm going to merge all of these patches and test it soon.

Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.