You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
drbd: factored tl_restart() out of tl_clear().
If IO was frozen for a temporal network outage, resend the content of the transfer-log into the newly established connection. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
@@ -634,6 +634,20 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
|
||||
/* else: done by handed_over_to_network */
|
||||
break;
|
||||
|
||||
case resend:
|
||||
/* If RQ_NET_OK is already set, we got a P_WRITE_ACK or P_RECV_ACK
|
||||
before the connection loss; only P_BARRIER_ACK was missing.
|
||||
Trowing them out of the TL here by pretending we got a BARRIER_ACK
|
||||
TODO: Either resync them, or ensure peer was not rebooted. */
|
||||
if (!(req->rq_state & RQ_NET_OK)) {
|
||||
if (req->w.cb) {
|
||||
drbd_queue_work(&mdev->data.work, &req->w);
|
||||
rv = req->rq_state & RQ_WRITE ? MR_WRITE : MR_READ;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* else, fall through to barrier_acked */
|
||||
|
||||
case barrier_acked:
|
||||
if (!(req->rq_state & RQ_WRITE))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user