Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] [PATCH] drbdadm: Fix does not allocate bitmap for stacked res
@ 2018-01-25  6:27 Nick Wang
  2018-01-26 15:26 ` Philipp Reisner
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Wang @ 2018-01-25  6:27 UTC (permalink / raw)
  To: drbd-dev; +Cc: Lars Ellenberg, Roland Kammerer

In e01b8b3e, allow peer_devices without bitmap.
However, should exclude stacked resource in this
case to avoid call trace caused by no bitmap,
bitmap->bitmap_index = -1.

Call Trace when init syncing to the stacked resource:
    drbd_bmio_set_n_write+0x39/0x70 [drbd]
    drbd_bitmap_io+0x8e/0xe0 [drbd]
    bitmap_mod_after_handshake+0xcb/0x1f0 [drbd]
    receive_state+0xada/0x16c0 [drbd]
    drbd_receiver+0x3b1/0x660 [drbd]

Signed-off-by: Nick Wang <nwang@suse.com>
CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: Roland Kammerer <roland.kammerer@linbit.com>
CC: drbd-dev@lists.linbit.com
---
 user/v9/drbdadm_postparse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/user/v9/drbdadm_postparse.c b/user/v9/drbdadm_postparse.c
index 1cefd5c2..2dabba66 100644
--- a/user/v9/drbdadm_postparse.c
+++ b/user/v9/drbdadm_postparse.c
@@ -465,7 +465,8 @@ static void add_no_bitmap_opt(struct d_resource *res)
 			continue;
 
 		STAILQ_FOREACH(peer_device, &conn->peer_devices, connection_link) {
-			if (peer_device->connection->peer && peer_diskless(peer_device))
+			if (peer_device->connection->peer && !peer_device->connection->peer->lower &&
+				peer_diskless(peer_device))
 				insert_tail(&peer_device->pd_options, new_opt("bitmap", "no"));
 		}
 	}
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-29  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-25  6:27 [Drbd-dev] [PATCH] drbdadm: Fix does not allocate bitmap for stacked res Nick Wang
2018-01-26 15:26 ` Philipp Reisner
2018-01-29  5:01   ` Nick Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox