Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242905
b: refs/heads/master
c: e636db5
h: refs/heads/master
i:
  242903: a126b35
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Mar 10, 2011
1 parent 18d83c7 commit d194ba5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 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: 0ddc5549f88dfc4a4c919693e9a86095e89e080b
refs/heads/master: e636db5b956950b8b9bfbeb766a637f84bae1e3b
25 changes: 0 additions & 25 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,23 +337,6 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
}


/* In C_AHEAD mode only out_of_sync packets are sent for requests. Detach
* those requests from the newsest barrier when changing to an other cstate.
*
* That headless list vanishes when the last request finished its write or
* send out_of_sync packet. */
static void tl_forget(struct drbd_conf *mdev)
{
struct drbd_tl_epoch *b;

if (test_bit(CREATE_BARRIER, &mdev->flags))
return;

b = mdev->newest_tle;
list_del(&b->requests);
_tl_add_barrier(mdev, b);
}

/**
* _tl_restart() - Walks the transfer log, and applies an action to all requests
* @mdev: DRBD device.
Expand Down Expand Up @@ -1265,14 +1248,6 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns,
if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED)
drbd_resume_al(mdev);

/* Start a new epoch in case we start to mirror write requests */
if (!drbd_should_do_remote(os) && drbd_should_do_remote(ns))
tl_forget(mdev);

/* Do not add local-only requests to an epoch with mirrored requests */
if (drbd_should_do_remote(os) && !drbd_should_do_remote(ns))
set_bit(CREATE_BARRIER, &mdev->flags);

ascw = kmalloc(sizeof(*ascw), GFP_ATOMIC);
if (ascw) {
ascw->os = os;
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,11 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
dev_err(DEV, "FIXME (barrier_acked but pending)\n");
list_move(&req->tl_requests, &mdev->out_of_sequence_requests);
}
D_ASSERT(req->rq_state & RQ_NET_SENT);
req->rq_state |= RQ_NET_DONE;
if (mdev->net_conf->wire_protocol == DRBD_PROT_A)
atomic_sub(req->size>>9, &mdev->ap_in_flight);
if ((req->rq_state & RQ_NET_MASK) != 0) {
req->rq_state |= RQ_NET_DONE;
if (mdev->net_conf->wire_protocol == DRBD_PROT_A)
atomic_sub(req->size>>9, &mdev->ap_in_flight);
}
_req_may_be_done(req, m); /* Allowed while state.susp */
break;

Expand Down

0 comments on commit d194ba5

Please sign in to comment.