diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-15 13:24:49 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-03 19:16:26 -0400 |
commit | 38fa9988fa838324a0cce6e2f9d3c674230659d5 (patch) | |
tree | 8797715df160a1ab72927c89c654a5752122a2d6 /drivers/block/drbd/drbd_worker.c | |
parent | 34f646bd5731cfd456fbacc95c12a2cf52275e54 (diff) |
drbd: Do not modify the connection state with something else that conn_request_state()
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_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index e459cb2076bd..a730520e468e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -1290,12 +1290,6 @@ int w_send_read_req(struct drbd_work *w, int cancel) | |||
1290 | ok = drbd_send_drequest(mdev, P_DATA_REQUEST, req->i.sector, req->i.size, | 1290 | ok = drbd_send_drequest(mdev, P_DATA_REQUEST, req->i.sector, req->i.size, |
1291 | (unsigned long)req); | 1291 | (unsigned long)req); |
1292 | 1292 | ||
1293 | if (!ok) { | ||
1294 | /* ?? we set C_TIMEOUT or C_BROKEN_PIPE in drbd_send(); | ||
1295 | * so this is probably redundant */ | ||
1296 | if (mdev->state.conn >= C_CONNECTED) | ||
1297 | drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE)); | ||
1298 | } | ||
1299 | req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED); | 1293 | req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED); |
1300 | 1294 | ||
1301 | return ok; | 1295 | return ok; |
@@ -1510,7 +1504,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) | |||
1510 | if (r > 0) { | 1504 | if (r > 0) { |
1511 | dev_info(DEV, "before-resync-target handler returned %d, " | 1505 | dev_info(DEV, "before-resync-target handler returned %d, " |
1512 | "dropping connection.\n", r); | 1506 | "dropping connection.\n", r); |
1513 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); | 1507 | conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD); |
1514 | return; | 1508 | return; |
1515 | } | 1509 | } |
1516 | } else /* C_SYNC_SOURCE */ { | 1510 | } else /* C_SYNC_SOURCE */ { |
@@ -1523,7 +1517,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) | |||
1523 | } else { | 1517 | } else { |
1524 | dev_info(DEV, "before-resync-source handler returned %d, " | 1518 | dev_info(DEV, "before-resync-source handler returned %d, " |
1525 | "dropping connection.\n", r); | 1519 | "dropping connection.\n", r); |
1526 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); | 1520 | conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD); |
1527 | return; | 1521 | return; |
1528 | } | 1522 | } |
1529 | } | 1523 | } |