Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
drbd
bsc1207127-02_drbd-Fix-setting-other-repl-state...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc1207127-02_drbd-Fix-setting-other-repl-state-in-other-connectio.patch of Package drbd
From 4a17922f93d7d6b0fb1e99f047fb823eff7f555c Mon Sep 17 00:00:00 2001 From: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon, 21 Sep 2020 10:00:28 +0200 Subject: [PATCH] drbd: Fix setting other repl-state in other connection when resync continues Here is a kernel log excert that shows the issue clearly: What happens here is that n1 decides to do a bitmap-based resync from n2 and a full resync from n3. 01:20:36 n1 r3/0 drbd0 n2: self 82DC4497639C7B4A:0000000000000000:78F1C917F6EBE27C:0000000000000000 bits:1266583 flags:22 01:20:36 n1 r3/0 drbd0 n2: peer 21D63086DB4692D6:82DC4497639C7B4A:BA087EDEAA78264E:0000000000000000 bits:312405 flags:20 01:20:36 n1 r3/0 drbd0 n2: uuid_compare()=target-use-bitmap by rule 50 01:20:36 n1 r3/0 drbd0 n3: drbd_sync_handshake: 01:20:36 n1 r3/0 drbd0 n3: self 82DC4497639C7B4A:0000000000000000:21D63086DB4692D6:78F1C917F6EBE27C bits:1266583 flags:22 01:20:36 n1 r3/0 drbd0 n3: peer B82B3E62CEBB1D26:21D63086DB4692D6:82DC4497639C7B4A:BA087EDEAA78264E bits:1572759 flags:20 01:20:36 n1 r3/0 drbd0 n3: uuid_compare()=target-set-bitmap by rule 60 The following two lines are expected, as it should prefer the resync that has tha smaller amounts of bits set. 01:20:36 n1 r3/0 drbd0 n2: repl( WFBitMapT -> SyncTarget ) 01:20:38 n1 r3/0 drbd0 n3: repl( WFBitMapT -> PausedSyncT ) Now n1 needs to switch resync source, because n2 is temporarily blocked in being resync source (resync-susp = peer). 01:20:38 n1 r3/0 drbd0 n3: repl( PausedSyncT -> SyncTarget ) resync-susp( connection dependency -> no ) 01:20:38 n1 r3/0 drbd0 n2: repl( SyncTarget -> PausedSyncT ) resync-susp( no -> peer ) 01:20:38 n1 r3/0 drbd0 n3: Syncer continues. 01:20:38 n1 r3/0 drbd0 n2: Resync suspended And here is the issue. n2 becomes ready to be sync source (resync-susp = no), and the resync continues. It also sets the resync-susp = connection dependency for n3 but it failes to pause the resync operation there. 01:21:01 n1 r3/0 drbd0 n3: resync-susp( no -> connection dependency ) 01:21:01 n1 r3/0 drbd0 n2: pdsk( Outdated -> UpToDate ) repl( PausedSyncT -> SyncTarget ) resync-susp( peer -> no ) 01:21:01 n1 r3/0 drbd0 n2: Syncer continues. 01:21:02 n1 r3/0 drbd0 n2: Retrying drbd_rs_del_all() later. refcnt=15 01:21:02 n1 r3/0 drbd0 n2: Resync done (total 26 sec; paused 23 sec; 2442664 K/sec) 01:21:02 n1 r3/0 drbd0 n2: updated UUIDs B82B3E62CEBB1D26:0000000000000000:21D63086DB4692D6:78F1C917F6 The obvious fix is to add the necessary lines to the code. --- drbd/drbd_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c index 9fcbed2201d4..71c1385254f9 100644 --- a/drbd/drbd_state.c +++ b/drbd/drbd_state.c @@ -1062,6 +1062,8 @@ static void set_resync_susp_other_c(struct drbd_peer_device *peer_device, bool v if (r == L_SYNC_SOURCE) p->repl_state[NEW] = L_PAUSED_SYNC_S; + else if (r == L_SYNC_TARGET) + p->repl_state[NEW] = L_PAUSED_SYNC_T; } } else { for_each_peer_device(p, device) { -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor