Re: Re: fr1-2.16 patch for 2.6.10 kernel

denis bonnenfant <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>

I applied this patch,

> 
> #ifdef CONFIG_MD_FR1
>                 /* clean the bitmap after resync */
>                 struct bitmap * bitmap = conf->bitmap;
>                 if (bitmap && bitmap->active(bitmap)) {
> -                       bitmap->clearbits(bitmap, r1_bio->sector >> 1,
> -                               r1_bio->master_bio->bi_size >> 10);
> +                       bitmap->clearbits(bitmap, r1_bio->sector >> 1,
> +                               r1_bio->sectors >> 1);
>                 }
> #endif /* CONFIG_MD_FR1 */
> 
> and that's better! There's another clearbits call too, but it seems t
> be OK as is. Maybe you can check.
> 
> There as also a setbits call whse data seemed suspicious to me:

And this one too, but i have a unlock #ifdef in the middle. Don't you ?

> 
> #ifdef CONFIG_MD_FR1
>         /* zero the bad disk count on the r1bio by default */
>         r1_bio->nonoperational = 0;

#endif /* CONFIG_MD_FR1 */
	spin_unlock_irq(&conf->device_lock);

#ifdef CONFIG_MD_FR1

>         /* mark the bitmap before write, just in case */
>         if (bitmap->active(bitmap)) {
> -                 bitmap->setbits(bitmap, bio->bi_sector >> 1,
> -                          bio_sectors(bio) >> 1); 
> +                 bitmap->setbits(bitmap, r1_bio->sector >> 1,
> +                          r1_bio->sectors >> 1);
>         }       
> #endif /* CONFIG_MD_FR1 */
> 


Anyway, it seems to work as expected now. I'm going to stress it a 
little bit more tomorrow whith a large-scale 2x400Gb fr1-enbd setup...
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.