aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2011-11-17 11:49:46 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:33 +0100
commitb379c41ed78e83c4443fca4dbfbc358c19e4f24c (patch)
tree4e5a3d472c67835406e4c511ada0277b97798c26 /drivers/block/drbd/drbd_req.c
parent9d05e7c4e7069180370ce9c2c121fd6f7810c5a3 (diff)
downloadvexpress-lsk-b379c41ed78e83c4443fca4dbfbc358c19e4f24c.tar.gz
drbd: transfer log epoch numbers are now per resource
cherry-picked from drbd 9 devel branch. In preparation of multiple connections, the "barrier number" or "epoch number" needs to be tracked per-resource, not per connection. The sequence number space will not be reset anymore. 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_req.c')
-rw-r--r--drivers/block/drbd/drbd_req.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 34e791dfaf8..a131174b667 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -187,7 +187,7 @@ static void _about_to_complete_local_write(struct drbd_conf *mdev,
*/
if (mdev->state.conn >= C_CONNECTED &&
(s & RQ_NET_SENT) != 0 &&
- req->epoch == mdev->tconn->newest_tle->br_number)
+ req->epoch == atomic_read(&mdev->tconn->current_tle_nr))
queue_barrier(mdev);
}
@@ -518,7 +518,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
* just after it grabs the req_lock */
D_ASSERT(test_bit(CREATE_BARRIER, &mdev->tconn->flags) == 0);
- req->epoch = mdev->tconn->newest_tle->br_number;
+ req->epoch = atomic_read(&mdev->tconn->current_tle_nr);
/* increment size of current epoch */
mdev->tconn->newest_tle->n_writes++;