[Drbd-dev] DRBD8: incorrect state transition Connected ->WFBitMapS and UpToDate->Inconsistent

Philipp Reisner philipp.reisner at linbit.com
Mon Nov 26 16:09:12 CET 2007


On Monday 26 November 2007 15:43:11 Montrose, Ernest wrote:
> Phil,
> Well as it turned out, my last idea did not completely fix the issue
> either.
> So it may be that my description and staging of it was not complete. I
> will try to completely describe the problem and then test your patch.  I
> will get back to you with the results as soon as I get them.
>
> FYI, your last idea also introduced an issue where a sync would stall
> for ever if paused and resumed quickly. If you checked it in somewhere,
> you might want to back out.
>

Oh, right. 
This makes it work also with quick pause-resume cycles:

--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -788,7 +788,7 @@ int _drbd_set_state(drbd_dev* mdev, drbd_state_t ns,enum chg_state_flags flags)
                INFO("Syncer continues.\n");
                mdev->rs_paused += (long)jiffies-(long)mdev->rs_mark_time;
                if (ns.conn == SyncTarget) {
-                       if (!test_bit(STOP_SYNC_TIMER,&mdev->flags)) {
+                       if (!test_and_clear_bit(STOP_SYNC_TIMER,&mdev->flags)) {
                                mod_timer(&mdev->resync_timer,jiffies);
                        }
                        /* This if (!test_bit) is only needed for the case


-Phil
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria        http://www.linbit.com :


More information about the drbd-dev mailing list