Skip to content

Commit

Permalink
drbd: fix regression, we need to close drbd epochs during normal oper…
Browse files Browse the repository at this point in the history
…ation

commit e2041475e6ddb081734d161f6421977323f5a9b9
drbd: Starting with protocol 96 we can allow app-IO while receiving the bitmap

Contained a bad chunk that tried to optimize away drbd barriers during
bitmap exchange, but accidentally dropped them for normal mode as well.

Impact: depending on activity log size and access pattern, activity log
extents may not be recycled in time, causeing IO to block indefinetely.

Fix: skip drbd barriers only if there is no connection to send them on,
or the request being completed has not been on the network at all.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Mar 10, 2011
1 parent 09b9e79 commit 8a3c104
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,14 @@ static void _about_to_complete_local_write(struct drbd_conf *mdev,
struct hlist_node *n;
struct hlist_head *slot;

/* before we can signal completion to the upper layers,
* we may need to close the current epoch */
if (mdev->state.conn >= C_WF_BITMAP_T && mdev->state.conn < C_AHEAD &&
/* Before we can signal completion to the upper layers,
* we may need to close the current epoch.
* We can skip this, if this request has not even been sent, because we
* did not have a fully established connection yet/anymore, during
* bitmap exchange, or while we are C_AHEAD due to congestion policy.
*/
if (mdev->state.conn >= C_CONNECTED &&
(s & RQ_NET_SENT) != 0 &&
req->epoch == mdev->newest_tle->br_number)
queue_barrier(mdev);

Expand Down

0 comments on commit 8a3c104

Please sign in to comment.