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>
This commit is contained in:
Philipp Reisner 2011-12-13 17:40:53 +01:00
parent e8cdc34335
commit a01842ebee
1 changed files with 7 additions and 1 deletions

View File

@ -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;
}