Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346233
b: refs/heads/master
c: 8a0bab2
h: refs/heads/master
i:
  346231: 264fc77
v: v3
  • Loading branch information
Philipp Reisner committed Nov 9, 2012
1 parent 5b835cb commit 813cfd3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e959d08d3ef6e48bc3b726bcc07a4ebb9989be94
refs/heads/master: 8a0bab2a6dd05ee35777370be892daba01750712
6 changes: 6 additions & 0 deletions trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,12 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
break;

case RESEND:
/* Simply complete (local only) READs. */
if (!(req->rq_state & RQ_WRITE) && !req->w.cb) {
mod_rq_state(req, m, RQ_COMPLETION_SUSP, 0);
break;
}

/* If RQ_NET_OK is already set, we got a P_WRITE_ACK or P_RECV_ACK
before the connection loss (B&C only); only P_BARRIER_ACK
(or the local completion?) was missing when we suspended.
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,6 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused)
if (ns_max.susp_fen) {
/* case1: The outdate peer handler is successful: */
if (ns_max.pdsk <= D_OUTDATED) {
tl_clear(tconn);
rcu_read_lock();
idr_for_each_entry(&tconn->volumes, mdev, vnr) {
if (test_bit(NEW_CUR_UUID, &mdev->flags)) {
Expand All @@ -1512,10 +1511,13 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused)
}
}
rcu_read_unlock();
conn_request_state(tconn,
(union drbd_state) { { .susp_fen = 1 } },
(union drbd_state) { { .susp_fen = 0 } },
CS_VERBOSE);
spin_lock_irq(&tconn->req_lock);
_tl_restart(tconn, CONNECTION_LOST_WHILE_PENDING);
_conn_request_state(tconn,
(union drbd_state) { { .susp_fen = 1 } },
(union drbd_state) { { .susp_fen = 0 } },
CS_VERBOSE);
spin_unlock_irq(&tconn->req_lock);
}
/* case2: The connection was established again: */
if (ns_min.conn >= C_CONNECTED) {
Expand Down

0 comments on commit 813cfd3

Please sign in to comment.