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>
This commit is contained in:
parent
7da358625c
commit
69b6a3b159
@ -929,8 +929,8 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (drbd_suspended(mdev)) {
|
if (drbd_suspended(mdev)) {
|
||||||
/* If we got suspended, use the retry mechanism of
|
/* If we got suspended, use the retry mechanism in
|
||||||
generic_make_request() to restart processing of this
|
drbd_make_request() to restart processing of this
|
||||||
bio. In the next call to drbd_make_request
|
bio. In the next call to drbd_make_request
|
||||||
we sleep in inc_ap_bio() */
|
we sleep in inc_ap_bio() */
|
||||||
ret = 1;
|
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(bio->bi_size > 0);
|
||||||
D_ASSERT(IS_ALIGNED(bio->bi_size, 512));
|
D_ASSERT(IS_ALIGNED(bio->bi_size, 512));
|
||||||
|
|
||||||
inc_ap_bio(mdev);
|
do {
|
||||||
return __drbd_make_request(mdev, bio, start_time);
|
inc_ap_bio(mdev);
|
||||||
|
} while (__drbd_make_request(mdev, bio, start_time));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is called by bio_add_page().
|
/* This is called by bio_add_page().
|
||||||
|
Loading…
Reference in New Issue
Block a user