From: Nick Wang <nwang@suse.com>
To: drbd-dev@lists.linbit.com
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>,
Roland Kammerer <roland.kammerer@linbit.com>
Subject: [Drbd-dev] [PATCH] drbdadm: Fix does not allocate bitmap for stacked res
Date: Thu, 25 Jan 2018 14:27:29 +0800 [thread overview]
Message-ID: <20180125062729.4142-1-nwang@suse.com> (raw)
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
next reply other threads:[~2018-01-25 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 6:27 Nick Wang [this message]
2018-01-26 15:26 ` [Drbd-dev] [PATCH] drbdadm: Fix does not allocate bitmap for stacked res Philipp Reisner
2018-01-29 5:01 ` Nick Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125062729.4142-1-nwang@suse.com \
--to=nwang@suse.com \
--cc=drbd-dev@lists.linbit.com \
--cc=lars.ellenberg@linbit.com \
--cc=roland.kammerer@linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox