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:"
> >     if (page) memset(page, 0, PAGE_SIZE);
> > 
> > The alloc is not guaranteed.

I haven't chased that down, but you might want to turn the bitmap off
after resync by adding the following to close_sync() in raid1.c, which
seems t be run at end of resync.

Untested (I'm not sure if it is right - what if the sync is aborted?
Will this fn still be run?).


 static void close_sync(conf_t *conf)
 {
         spin_lock_irq(&conf->resync_lock);
         wait_event_lock_irq(conf->wait_resume, !conf->barrier, conf->resync_lock);
         spin_unlock_irq(&conf->resync_lock);
 
         if (conf->barrier) BUG();
         if (waitqueue_active(&conf->wait_idle)) BUG();
 
         mempool_destroy(conf->r1buf_pool);
         conf->r1buf_pool = NULL;
 
+#ifdef CONFIG_MD_FR1
+        if (conf->bitmap) {
+                struct bitmap *bitmap = conf->bitmap;
+                bitmap->stop(bitmap); // flag bitmap inactive
+        }
+#endif /* CONFIG_MD_FR1 */
 }

I don't know if that's dangerous.  It doesn't look so. It clears a flag
in the bitmap and that's all. I can see why I didn't bother.

To be braver, one could flush the bitmap pages by running

                 remove_bitmap(conf);
                 create_bitmap(conf);

which readies it again. That will change conf->bitmap, so nothing had
better be holding that value.

After create, a start call is still required in order to turn it on.
That's issued by the fault code. The start call sets the event count.

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.