aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2011-03-31 15:18:56 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:45:01 +0100
commit181286ad22bf9bfb85de625e8501285de5261b35 (patch)
tree02ea5a0be7525834ed51a875d661872bd2047c60 /drivers/block/drbd/drbd_req.c
parent85f103d88c8eb91755eb3c103e5ead2c9389e35e (diff)
downloadvexpress-lsk-181286ad22bf9bfb85de625e8501285de5261b35.tar.gz
drbd: preparation commit, pass drbd_interval to drbd_al_begin/complete_io
We want to avoid bio_split for bios crossing activity log boundaries. So we may need to activate two activity log extents "atomically". drbd_al_begin_io() needs to know more than just the start sector. 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index e380ffb7f4f..4406d829800 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -128,12 +128,12 @@ static void _req_is_done(struct drbd_conf *mdev, struct drbd_request *req, const
if (s & RQ_LOCAL_MASK) {
if (get_ldev_if_state(mdev, D_FAILED)) {
if (s & RQ_IN_ACT_LOG)
- drbd_al_complete_io(mdev, req->i.sector);
+ drbd_al_complete_io(mdev, &req->i);
put_ldev(mdev);
} else if (__ratelimit(&drbd_ratelimit_state)) {
- dev_warn(DEV, "Should have called drbd_al_complete_io(, %llu), "
- "but my Disk seems to have failed :(\n",
- (unsigned long long) req->i.sector);
+ dev_warn(DEV, "Should have called drbd_al_complete_io(, %llu, %u), "
+ "but my Disk seems to have failed :(\n",
+ (unsigned long long) req->i.sector, req->i.size);
}
}
}
@@ -782,7 +782,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
* of transactional on-disk meta data updates. */
if (rw == WRITE && local && !test_bit(AL_SUSPENDED, &mdev->flags)) {
req->rq_state |= RQ_IN_ACT_LOG;
- drbd_al_begin_io(mdev, sector);
+ drbd_al_begin_io(mdev, &req->i);
}
remote = remote && drbd_should_do_remote(mdev->state);
@@ -979,7 +979,7 @@ allocate_barrier:
fail_free_complete:
if (req->rq_state & RQ_IN_ACT_LOG)
- drbd_al_complete_io(mdev, sector);
+ drbd_al_complete_io(mdev, &req->i);
fail_and_free_req:
if (local) {
bio_put(req->private_bio);