aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-12-20 11:49:58 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:13 +0100
commit69b6a3b159927d45092f64e07f40d5ecf93e11d8 (patch)
treeefce0b7a337f23d1b3f3157a7bb576a294163e58 /drivers/block/drbd/drbd_req.c
parent7da358625c056b631b0abf2fcf50dad5bcbc22d9 (diff)
downloadvexpress-lsk-69b6a3b159927d45092f64e07f40d5ecf93e11d8.tar.gz
drbd: restart loop in drbd_make_request() [prepare for Linux-3.2]
With Linux-3.2 generic_make_request() will no longer loop over the request function until it finally returns 0. Move this loop into our drbd_make_request() function. 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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index cf3c10e23c5..e9a2f238b89 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -929,8 +929,8 @@ allocate_barrier:
}
if (drbd_suspended(mdev)) {
- /* If we got suspended, use the retry mechanism of
- generic_make_request() to restart processing of this
+ /* If we got suspended, use the retry mechanism in
+ drbd_make_request() to restart processing of this
bio. In the next call to drbd_make_request
we sleep in inc_ap_bio() */
ret = 1;
@@ -1110,8 +1110,11 @@ int drbd_make_request(struct request_queue *q, struct bio *bio)
D_ASSERT(bio->bi_size > 0);
D_ASSERT(IS_ALIGNED(bio->bi_size, 512));
- inc_ap_bio(mdev);
- return __drbd_make_request(mdev, bio, start_time);
+ do {
+ inc_ap_bio(mdev);
+ } while (__drbd_make_request(mdev, bio, start_time));
+
+ return 0;
}
/* This is called by bio_add_page().