summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_state.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-12-13 20:40:53 +0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 19:58:13 +0400
commita01842ebeea315cbe4382703c065f671d8cd7622 (patch)
treec8963a431fc2047a931befce4c84563104a2dfa8 /drivers/block/drbd/drbd_state.c
parente8cdc3433568a1741e95c1d4412a7fb9736d0eac (diff)
downloadlinux-a01842ebeea315cbe4382703c065f671d8cd7622.tar.xz
drbd: Log failures of connection state changes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_state.c')
-rw-r--r--drivers/block/drbd/drbd_state.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index 507cfccc1be7..70aa9603e368 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -1730,7 +1730,13 @@ _conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_
conn_err(tconn, "Could not kmalloc an acscw\n");
}
-abort:
+ return rv;
+ abort:
+ if (flags & CS_VERBOSE) {
+ conn_err(tconn, "State change failed: %s\n", drbd_set_st_err_str(rv));
+ conn_err(tconn, " state = { cs:%s }\n", drbd_conn_str(oc));
+ conn_err(tconn, "wanted = { cs:%s }\n", drbd_conn_str(val.conn));
+ }
return rv;
}