Re: fr1-2.16 patch for 2.6.10 kernel

[email protected] (Peter T. Breuer)
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
In article <[email protected]> you wrote:
> Peter T. Breuer a ?crit :
> >>  during resync, but it seems that it remains untouched from a cycle to 
> >>another one. Maybe a cache effect ?
> > 
> 
> >>(raid1.c)
> >>
> >>        * on writes, clear the bitmap if all disks were written
> >>          */
> >>         int uptodate = test_bit(R1BIO_Uptodate, &r1_bio->state);
> >>        conf_t *conf = mddev_to_conf(r1_bio->mddev);
> >>
> >>         /* if we should mark the bitmap clean, do so */
> >>         if (uptodate && bio_data_dir(bio) == WRITE
> >>                      && r1_bio->nonoperational <= 0) {
> >>                 struct bitmap * bitmap = conf->bitmap;
> >>                 if (bitmap && bitmap->active(bitmap)) {
> 
> I put a printk here, and it is never hit...

It WILL be hit every time one enters this routine . Are you saying that 
 r1_bio->nonoperational > 0?

It's zeroed in make_request. Then the number of missing disks are
counted ...

        for (i = 0; i < disks; i++) {
                if (r1_bio->bios[i])
                        continue; // this is nonzero if the disk is good
                /* we will mark bitmap for missing or faulty device */
                sum_nobios++;
                /* mark bitmap as dirty if it wasn't so marked */
                if (!conf->bitmap_dirty && bitmap->active(bitmap)) {
                        conf->bitmap_dirty = 1;
                        mddev->bitmap_events = mddev->events;
                }
        }
        r1_bio->nonoperational = sum_nobios;

On the write branch, the r1_bio->bios[i] is definitely set non -null exactly 
for good disks. Higher up in make_request:

        disks  = conf->raid_disks;
        for (i = 0;  i < disks; i++) {
                if (conf->mirrors[i].rdev &&
                    !conf->mirrors[i].rdev->faulty) {
                        atomic_inc(&conf->mirrors[i].rdev->nr_pending);
                        r1_bio->bios[i] = bio;
                } else
                        r1_bio->bios[i] = NULL;
        }


so I don't see how it could be positive if all the disks are in the
mirror!

Can you check that?

Peter
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.