drbd: Log failures of connection state changes
authorPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 13 Dec 2011 16:40:53 +0000 (17:40 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:13 +0000 (16:58 +0100)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_state.c

index 507cfccc1be7379daea67ccac78b2a9794c34522..70aa9603e3682da2bee6961f0ef0072b8fdcc75d 100644 (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;
 }