From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 06/10] drbd: Improve the "unexpected packet" error messages
Date: Thu, 13 Oct 2011 12:32:12 +0200 [thread overview]
Message-ID: <1318501936-11689-7-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1318501936-11689-1-git-send-email-philipp.reisner@linbit.com>
From: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_receiver.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index d55a3cb..7218750 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -3200,8 +3200,8 @@ static int ignore_remaining_packet(struct drbd_tconn *tconn, struct packet_info
*/
static int config_unknown_volume(struct drbd_tconn *tconn, struct packet_info *pi)
{
- conn_warn(tconn, "Volume %u unknown; ignoring %s packet\n",
- pi->vnr, cmdname(pi->cmd));
+ conn_warn(tconn, "%s packet received for volume %u, which is not configured locally\n",
+ cmdname(pi->cmd), pi->vnr);
return ignore_remaining_packet(tconn, pi);
}
@@ -4256,13 +4256,15 @@ static void drbdd(struct drbd_tconn *tconn)
cmd = &drbd_cmd_handler[pi.cmd];
if (unlikely(pi.cmd >= ARRAY_SIZE(drbd_cmd_handler) || !cmd->fn)) {
- conn_err(tconn, "unknown packet type %d, l: %d!\n", pi.cmd, pi.size);
+ conn_err(tconn, "Unexpected data packet %s (0x%04x)",
+ cmdname(pi.cmd), pi.cmd);
goto err_out;
}
shs = cmd->pkt_size;
if (pi.size > shs && !cmd->expect_payload) {
- conn_err(tconn, "No payload expected %s l:%d\n", cmdname(pi.cmd), pi.size);
+ conn_err(tconn, "No payload expected %s l:%d\n",
+ cmdname(pi.cmd), pi.size);
goto err_out;
}
@@ -4474,7 +4476,7 @@ static int drbd_do_features(struct drbd_tconn *tconn)
if (pi.cmd != P_CONNECTION_FEATURES) {
conn_err(tconn, "expected ConnectionFeatures packet, received: %s (0x%04x)\n",
- cmdname(pi.cmd), pi.cmd);
+ cmdname(pi.cmd), pi.cmd);
return -1;
}
@@ -4583,7 +4585,7 @@ static int drbd_do_auth(struct drbd_tconn *tconn)
if (pi.cmd != P_AUTH_CHALLENGE) {
conn_err(tconn, "expected AuthChallenge packet, received: %s (0x%04x)\n",
- cmdname(pi.cmd), pi.cmd);
+ cmdname(pi.cmd), pi.cmd);
rv = 0;
goto fail;
}
@@ -4642,7 +4644,7 @@ static int drbd_do_auth(struct drbd_tconn *tconn)
if (pi.cmd != P_AUTH_RESPONSE) {
conn_err(tconn, "expected AuthResponse packet, received: %s (0x%04x)\n",
- cmdname(pi.cmd), pi.cmd);
+ cmdname(pi.cmd), pi.cmd);
rv = 0;
goto fail;
}
@@ -5192,8 +5194,8 @@ int drbd_asender(struct drbd_thread *thi)
goto reconnect;
cmd = &asender_tbl[pi.cmd];
if (pi.cmd >= ARRAY_SIZE(asender_tbl) || !cmd->fn) {
- conn_err(tconn, "unknown command %d on meta (l: %d)\n",
- pi.cmd, pi.size);
+ conn_err(tconn, "Unexpected meta packet %s (0x%04x)\n",
+ cmdname(pi.cmd), pi.cmd);
goto disconnect;
}
expect = header_size + cmd->pkt_size;
--
1.7.4.1
next prev parent reply other threads:[~2011-10-13 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 10:32 [RFC 00/10] drbd: part 19 of adding multiple volume support to drbd Philipp Reisner
2011-10-13 10:32 ` [PATCH 01/10] drbd: allow ping-timeout of up to 30 seconds Philipp Reisner
2011-10-13 10:32 ` [PATCH 02/10] drbd: downgraded error printk to info Philipp Reisner
2011-10-13 10:32 ` [PATCH 03/10] drbd: Fixes from the 8.3 development branch Philipp Reisner
2011-10-13 10:32 ` [PATCH 04/10] drbd: Improve compatibility with drbd's older than 8.3.7 Philipp Reisner
2011-10-13 10:32 ` [PATCH 05/10] drbd: Fixed state transitions in case reading meta data failes Philipp Reisner
2011-10-13 10:32 ` Philipp Reisner [this message]
2011-10-13 10:32 ` [PATCH 07/10] drbd: detach from frozen backing device Philipp Reisner
2011-10-13 10:32 ` [PATCH 08/10] drbd: on attach, enforce clean meta data Philipp Reisner
2011-10-13 10:32 ` [PATCH 09/10] drbd: Fixed removal of volumes/devices from connected resources Philipp Reisner
2011-10-13 10:32 ` [PATCH 10/10] drbd: Eliminated the "notified peer" messages Philipp Reisner
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=1318501936-11689-7-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®