mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 12/14] drbd: Remove useless error messages
Date: Wed,  7 Sep 2011 16:17:39 +0200	[thread overview]
Message-ID: <1315405061-1473-13-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1315405061-1473-1-git-send-email-philipp.reisner@linbit.com>

From: Andreas Gruenbacher <agruen@linbit.com>

These messages can only trigger in case there is a pretty obvious
internal programming error.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
 drivers/block/drbd/drbd_receiver.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index a4b24f9..227cddc 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2183,8 +2183,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packet cmd,
 			drbd_send_ack_ex(mdev, P_OV_RESULT, sector, size, ID_IN_SYNC);
 			break;
 		default:
-			dev_err(DEV, "unexpected command (%s) in receive_DataRequest\n",
-				cmdname(cmd));
+			BUG();
 		}
 		if (verb && __ratelimit(&drbd_ratelimit_state))
 			dev_err(DEV, "Can not satisfy peer's read request, "
@@ -2270,10 +2269,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packet cmd,
 		break;
 
 	default:
-		dev_err(DEV, "unexpected command (%s) in receive_DataRequest\n",
-		    cmdname(cmd));
-		fault_type = DRBD_FAULT_MAX;
-		goto out_free_e;
+		BUG();
 	}
 
 	/* Throttle, drbd_rs_begin_io and submit should become asynchronous
-- 
1.7.4.1


  parent reply	other threads:[~2011-09-07 16:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 14:17 [RFC 00/14] drbd: part 7 of adding multiple volume support to drbd Philipp Reisner
2011-09-07 14:17 ` [PATCH 01/14] drbd: drbd_connected(): Return an error code upon failure Philipp Reisner
2011-09-07 14:17 ` [PATCH 02/14] drbd: Always use the same protocol version for the same peer Philipp Reisner
2011-09-07 14:17 ` [PATCH 03/14] drbd: Move drbd_send_ping() and drbd_send_ping_ack() to drbd_main.c Philipp Reisner
2011-09-07 14:17 ` [PATCH 04/14] drbd: Make _drbd_send_bitmap() static Philipp Reisner
2011-09-07 14:17 ` [PATCH 05/14] drbd: Rename the DCBP_* functions to dcbp_* and move them to where they are used Philipp Reisner
2011-09-07 14:17 ` [PATCH 06/14] drbd: Converted drbd_try_outdate_peer() from mdev to tconn Philipp Reisner
2011-09-07 14:17 ` [PATCH 07/14] drbd: Preallocate one page per drbd_socket as a receive buffer Philipp Reisner
2011-09-07 14:17 ` [PATCH 08/14] drbd: receive_bitmap(): Use the pre-allocated " Philipp Reisner
2011-09-07 14:17 ` [PATCH 09/14] drbd: Preallocate one page per drbd_socket as a send buffer Philipp Reisner
2011-09-07 14:17 ` [PATCH 10/14] drbd: _drbd_send_bitmap(): Use the pre-allocated " Philipp Reisner
2011-09-07 14:17 ` [PATCH 11/14] drbd: A small cleanup in drbdd() Philipp Reisner
2011-09-07 14:17 ` Philipp Reisner [this message]
2011-09-07 14:17 ` [PATCH 13/14] drbd: Pass struct packet_info down to the receive functions Philipp Reisner
2011-09-07 14:17 ` [PATCH 14/14] drbd: Map from (connection, volume number) to device in the receive handlers 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=1315405061-1473-13-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®