aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-01-24 10:49:58 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:58:35 -0500
commit5df69ece6e93cfd4e09b14bf32bd101df6cbde38 (patch)
tree415a402956088609d20ba15f77015b9c8c073705 /drivers
parent5da9c8364443797ece9393670fb7ab69cff055ed (diff)
drbd: __drbd_make_request() is now void
The previous commit causes __drbd_make_request() to always return 0. Change it to void. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_int.h2
-rw-r--r--drivers/block/drbd/drbd_main.c5
-rw-r--r--drivers/block/drbd/drbd_req.c13
3 files changed, 9 insertions, 11 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 309c121557ae..8536fabbf984 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1403,7 +1403,7 @@ extern void conn_free_crypto(struct drbd_tconn *tconn);
1403extern int proc_details; 1403extern int proc_details;
1404 1404
1405/* drbd_req */ 1405/* drbd_req */
1406extern int __drbd_make_request(struct drbd_conf *, struct bio *, unsigned long); 1406extern void __drbd_make_request(struct drbd_conf *, struct bio *, unsigned long);
1407extern int drbd_make_request(struct request_queue *q, struct bio *bio); 1407extern int drbd_make_request(struct request_queue *q, struct bio *bio);
1408extern int drbd_read_remote(struct drbd_conf *mdev, struct drbd_request *req); 1408extern int drbd_read_remote(struct drbd_conf *mdev, struct drbd_request *req);
1409extern int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct bio_vec *bvec); 1409extern int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct bio_vec *bvec);
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 8c6c48e363cd..bedfeeccd513 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2236,9 +2236,8 @@ static void do_retry(struct work_struct *ws)
2236 2236
2237 /* We are not just doing generic_make_request(), 2237 /* We are not just doing generic_make_request(),
2238 * as we want to keep the start_time information. */ 2238 * as we want to keep the start_time information. */
2239 do { 2239 inc_ap_bio(mdev);
2240 inc_ap_bio(mdev); 2240 __drbd_make_request(mdev, bio, start_time);
2241 } while(__drbd_make_request(mdev, bio, start_time));
2242 } 2241 }
2243} 2242}
2244 2243
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index d2d61af034ec..6bac415358d7 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -945,7 +945,7 @@ drbd_submit_req_private_bio(struct drbd_request *req)
945 bio_endio(bio, -EIO); 945 bio_endio(bio, -EIO);
946} 946}
947 947
948int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time) 948void __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time)
949{ 949{
950 const int rw = bio_rw(bio); 950 const int rw = bio_rw(bio);
951 struct bio_and_error m = { NULL, }; 951 struct bio_and_error m = { NULL, };
@@ -960,7 +960,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
960 * if user cannot handle io errors, that's not our business. */ 960 * if user cannot handle io errors, that's not our business. */
961 dev_err(DEV, "could not kmalloc() req\n"); 961 dev_err(DEV, "could not kmalloc() req\n");
962 bio_endio(bio, -ENOMEM); 962 bio_endio(bio, -ENOMEM);
963 return 0; 963 return;
964 } 964 }
965 req->start_time = start_time; 965 req->start_time = start_time;
966 966
@@ -1039,7 +1039,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
1039 drbd_submit_req_private_bio(req); 1039 drbd_submit_req_private_bio(req);
1040 /* once we have submitted, we must no longer look at req, 1040 /* once we have submitted, we must no longer look at req,
1041 * it may already be destroyed. */ 1041 * it may already be destroyed. */
1042 return 0; 1042 return;
1043 } else if (no_remote) { 1043 } else if (no_remote) {
1044nodata: 1044nodata:
1045 if (__ratelimit(&drbd_ratelimit_state)) 1045 if (__ratelimit(&drbd_ratelimit_state))
@@ -1054,7 +1054,7 @@ out:
1054 1054
1055 if (m.bio) 1055 if (m.bio)
1056 complete_master_bio(mdev, &m); 1056 complete_master_bio(mdev, &m);
1057 return 0; 1057 return;
1058} 1058}
1059 1059
1060int drbd_make_request(struct request_queue *q, struct bio *bio) 1060int drbd_make_request(struct request_queue *q, struct bio *bio)
@@ -1070,9 +1070,8 @@ int drbd_make_request(struct request_queue *q, struct bio *bio)
1070 D_ASSERT(bio->bi_size > 0); 1070 D_ASSERT(bio->bi_size > 0);
1071 D_ASSERT(IS_ALIGNED(bio->bi_size, 512)); 1071 D_ASSERT(IS_ALIGNED(bio->bi_size, 512));
1072 1072
1073 do { 1073 inc_ap_bio(mdev);
1074 inc_ap_bio(mdev); 1074 __drbd_make_request(mdev, bio, start_time);
1075 } while (__drbd_make_request(mdev, bio, start_time));
1076 1075
1077 return 0; 1076 return 0;
1078} 1077}