]> git.karo-electronics.de Git - linux-beck.git/commit
drbd: fix for spurious full sync (becoming sync target looked like invalidate)
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 21 Jul 2010 15:04:32 +0000 (17:04 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 16:38:37 +0000 (18:38 +0200)
commitf2906e183f5460df9d9e774f5952f5ff670b3913
treef30736542841df13d66c5aa3f6507105fdc8f7ac
parent02bc7174ae83617b4364dc179d95d848d9fd6db5
drbd: fix for spurious full sync (becoming sync target looked like invalidate)

If a synctarget lost connection while being WFSyncUUID,
due to "state sanitizing", the attempted state change to SyncTarget
looked like an "invalidate" to after_state_ch() later,
thus caused a full sync on next handshake (Bug #318).

drbd0: PingAck did not arrive in time.
drbd0: peer( Primary -> Unknown ) conn( WFSyncUUID -> NetworkFailure ) pdsk( UpToDate -> DUnknown )

        from  : { cs:NetworkFailure ro:Secondary/Unknown ds:UpToDate/DUnknown r--- }
        to    : { cs:SyncTarget ro:Secondary/Unknown ds:Inconsistent/DUnknown r--- }
        after sanizising, resulted in
        state: { cs:NetworkFailure ro:Secondary/Unknown ds:Inconsistent/DUnknown r--- }
        drbd0: disk( UpToDate -> Inconsistent )

Fix:
don't mask state transition errors in "sanitizing",
so the requested state change to SyncTarget fails,
instead of being implicitly "remaped" to invalidate.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c