Browse Source

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>
Philipp Reisner 13 years ago
parent
commit
a01842ebee
1 changed files with 7 additions and 1 deletions
  1. 7 1
      drivers/block/drbd/drbd_state.c

+ 7 - 1
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;
 }