[Drbd-dev] DRBD8: Resync of device PauseSync state does not resume after an I/O error.

Philipp Reisner philipp.reisner at linbit.com
Fri Mar 2 14:33:04 CET 2007


Am Montag, 26. Februar 2007 22:30 schrieb Montrose, Ernest:
> Hi all,
> Looks like what's going on is that on an I/O error during resync (on the
> sync source), the io error handler set the new state to
> "Connected" and after_state_ch() is not called but scheduled it seems.
> Next time after_state_ch()
> is called the conn state is "Connected" for both old and new and the
> disk state is Diskless.
> We do not cal resume_next_sg() for this combination of state.  Could it
> be as simple as this patch?

Hi Ernest,

Ok, I now understand what was going on there. The __drbd_chk_io_error()
functions sets the disk to failed.
As a consequence in _drbd_set_state:

	if( ns.conn > Connected && (ns.disk <= Failed || ns.pdsk <= Failed )) {
		warn_sync_abort=1;
		ns.conn = Connected;
	}

The ns gets set to Connected. But the after_state_ch() is not called nor
scheduled...


I propose to fix it with this patch. Could you please test this patch?
If this patches fixes the issue as well ?

--- drbd_int.h  (revision 2773)
+++ drbd_int.h  (working copy)
@@ -1473,7 +1473,8 @@
        case Detach:
        case CallIOEHelper:
                if (mdev->state.disk > Failed) {
-                       _drbd_set_state(_NS(mdev,disk,Failed),ChgStateHard);
+                       _drbd_set_state(_NS(mdev,disk,Failed),
+                                       ChgStateHard|ScheduleAfter);
                        ERR("Local IO failed. Detaching...\n");
                }
                break;

In case it does, I will commit this, since it is the more generic fix 
to the issue. 

-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