diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-02-17 10:46:59 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-10-14 10:47:36 -0400 |
commit | fcefa62e4c26e70c70b9e8252a4bc9b9031a4182 (patch) | |
tree | b4753bfb7342205687aca576bf424df0131f9747 | |
parent | fbe29dec98622369c106ba72279500fb2f5aba99 (diff) |
drbd: Rename drbd_endio_{pri,sec} -> drbd_{,peer_}request_endio
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 13 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 4 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_req.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 8 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_wrappers.h | 4 |
6 files changed, 17 insertions, 16 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 93c4db3ac67e..93eb3a7ac711 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -661,7 +661,7 @@ struct drbd_request { | |||
661 | /* if local IO is not allowed, will be NULL. | 661 | /* if local IO is not allowed, will be NULL. |
662 | * if local IO _is_ allowed, holds the locally submitted bio clone, | 662 | * if local IO _is_ allowed, holds the locally submitted bio clone, |
663 | * or, after local IO completion, the ERR_PTR(error). | 663 | * or, after local IO completion, the ERR_PTR(error). |
664 | * see drbd_endio_pri(). */ | 664 | * see drbd_request_endio(). */ |
665 | struct bio *private_bio; | 665 | struct bio *private_bio; |
666 | 666 | ||
667 | struct drbd_interval i; | 667 | struct drbd_interval i; |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 6b00650d2805..1547c5106ab7 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1136,7 +1136,7 @@ next_bio: | |||
1136 | bio->bi_bdev = mdev->ldev->backing_bdev; | 1136 | bio->bi_bdev = mdev->ldev->backing_bdev; |
1137 | bio->bi_rw = rw; | 1137 | bio->bi_rw = rw; |
1138 | bio->bi_private = peer_req; | 1138 | bio->bi_private = peer_req; |
1139 | bio->bi_end_io = drbd_endio_sec; | 1139 | bio->bi_end_io = drbd_peer_request_endio; |
1140 | 1140 | ||
1141 | bio->bi_next = bios; | 1141 | bio->bi_next = bios; |
1142 | bios = bio; | 1142 | bios = bio; |
@@ -1572,7 +1572,7 @@ static int receive_RSDataReply(struct drbd_conf *mdev, enum drbd_packet cmd, | |||
1572 | if (get_ldev(mdev)) { | 1572 | if (get_ldev(mdev)) { |
1573 | /* data is submitted to disk within recv_resync_read. | 1573 | /* data is submitted to disk within recv_resync_read. |
1574 | * corresponding put_ldev done below on error, | 1574 | * corresponding put_ldev done below on error, |
1575 | * or in drbd_endio_sec. */ | 1575 | * or in drbd_peer_request_endio. */ |
1576 | ok = recv_resync_read(mdev, sector, data_size); | 1576 | ok = recv_resync_read(mdev, sector, data_size); |
1577 | } else { | 1577 | } else { |
1578 | if (__ratelimit(&drbd_ratelimit_state)) | 1578 | if (__ratelimit(&drbd_ratelimit_state)) |
@@ -1760,10 +1760,11 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packet cmd, | |||
1760 | return drbd_drain_block(mdev, data_size); | 1760 | return drbd_drain_block(mdev, data_size); |
1761 | } | 1761 | } |
1762 | 1762 | ||
1763 | /* get_ldev(mdev) successful. | 1763 | /* |
1764 | * Corresponding put_ldev done either below (on various errors), | 1764 | * Corresponding put_ldev done either below (on various errors), or in |
1765 | * or in drbd_endio_sec, if we successfully submit the data at | 1765 | * drbd_peer_request_endio, if we successfully submit the data at the |
1766 | * the end of this function. */ | 1766 | * end of this function. |
1767 | */ | ||
1767 | 1768 | ||
1768 | sector = be64_to_cpu(p->sector); | 1769 | sector = be64_to_cpu(p->sector); |
1769 | peer_req = read_in_block(mdev, p->block_id, sector, data_size); | 1770 | peer_req = read_in_block(mdev, p->block_id, sector, data_size); |
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 45a543e5c6a9..18eb3d17f174 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -116,7 +116,7 @@ static void _req_is_done(struct drbd_conf *mdev, struct drbd_request *req, const | |||
116 | drbd_set_in_sync(mdev, req->i.sector, req->i.size); | 116 | drbd_set_in_sync(mdev, req->i.sector, req->i.size); |
117 | 117 | ||
118 | /* one might be tempted to move the drbd_al_complete_io | 118 | /* one might be tempted to move the drbd_al_complete_io |
119 | * to the local io completion callback drbd_endio_pri. | 119 | * to the local io completion callback drbd_request_endio. |
120 | * but, if this was a mirror write, we may only | 120 | * but, if this was a mirror write, we may only |
121 | * drbd_al_complete_io after this is RQ_NET_DONE, | 121 | * drbd_al_complete_io after this is RQ_NET_DONE, |
122 | * otherwise the extent could be dropped from the al | 122 | * otherwise the extent could be dropped from the al |
@@ -252,7 +252,7 @@ void _req_may_be_done(struct drbd_request *req, struct bio_and_error *m) | |||
252 | * what we need to do here is just: complete the master_bio. | 252 | * what we need to do here is just: complete the master_bio. |
253 | * | 253 | * |
254 | * local completion error, if any, has been stored as ERR_PTR | 254 | * local completion error, if any, has been stored as ERR_PTR |
255 | * in private_bio within drbd_endio_pri. | 255 | * in private_bio within drbd_request_endio. |
256 | */ | 256 | */ |
257 | int ok = (s & RQ_LOCAL_OK) || (s & RQ_NET_OK); | 257 | int ok = (s & RQ_LOCAL_OK) || (s & RQ_NET_OK); |
258 | int error = PTR_ERR(req->private_bio); | 258 | int error = PTR_ERR(req->private_bio); |
diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h index e6232ce5a1ca..e6f2361d6b19 100644 --- a/drivers/block/drbd/drbd_req.h +++ b/drivers/block/drbd/drbd_req.h | |||
@@ -230,7 +230,7 @@ static inline void drbd_req_make_private_bio(struct drbd_request *req, struct bi | |||
230 | req->private_bio = bio; | 230 | req->private_bio = bio; |
231 | 231 | ||
232 | bio->bi_private = req; | 232 | bio->bi_private = req; |
233 | bio->bi_end_io = drbd_endio_pri; | 233 | bio->bi_end_io = drbd_request_endio; |
234 | bio->bi_next = NULL; | 234 | bio->bi_next = NULL; |
235 | } | 235 | } |
236 | 236 | ||
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 2da2d23344f9..01ab0bc0cd9e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -45,8 +45,8 @@ static int w_make_resync_request(struct drbd_work *w, int cancel); | |||
45 | 45 | ||
46 | /* endio handlers: | 46 | /* endio handlers: |
47 | * drbd_md_io_complete (defined here) | 47 | * drbd_md_io_complete (defined here) |
48 | * drbd_endio_pri (defined here) | 48 | * drbd_request_endio (defined here) |
49 | * drbd_endio_sec (defined here) | 49 | * drbd_peer_request_endio (defined here) |
50 | * bm_async_io_complete (defined in drbd_bitmap.c) | 50 | * bm_async_io_complete (defined in drbd_bitmap.c) |
51 | * | 51 | * |
52 | * For all these callbacks, note the following: | 52 | * For all these callbacks, note the following: |
@@ -151,7 +151,7 @@ static void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __rel | |||
151 | /* writes on behalf of the partner, or resync writes, | 151 | /* writes on behalf of the partner, or resync writes, |
152 | * "submitted" by the receiver. | 152 | * "submitted" by the receiver. |
153 | */ | 153 | */ |
154 | void drbd_endio_sec(struct bio *bio, int error) | 154 | void drbd_peer_request_endio(struct bio *bio, int error) |
155 | { | 155 | { |
156 | struct drbd_peer_request *peer_req = bio->bi_private; | 156 | struct drbd_peer_request *peer_req = bio->bi_private; |
157 | struct drbd_conf *mdev = peer_req->w.mdev; | 157 | struct drbd_conf *mdev = peer_req->w.mdev; |
@@ -187,7 +187,7 @@ void drbd_endio_sec(struct bio *bio, int error) | |||
187 | 187 | ||
188 | /* read, readA or write requests on R_PRIMARY coming from drbd_make_request | 188 | /* read, readA or write requests on R_PRIMARY coming from drbd_make_request |
189 | */ | 189 | */ |
190 | void drbd_endio_pri(struct bio *bio, int error) | 190 | void drbd_request_endio(struct bio *bio, int error) |
191 | { | 191 | { |
192 | unsigned long flags; | 192 | unsigned long flags; |
193 | struct drbd_request *req = bio->bi_private; | 193 | struct drbd_request *req = bio->bi_private; |
diff --git a/drivers/block/drbd/drbd_wrappers.h b/drivers/block/drbd/drbd_wrappers.h index 151f1a37478f..decf9b282e8b 100644 --- a/drivers/block/drbd/drbd_wrappers.h +++ b/drivers/block/drbd/drbd_wrappers.h | |||
@@ -20,8 +20,8 @@ static inline void drbd_set_my_capacity(struct drbd_conf *mdev, | |||
20 | 20 | ||
21 | /* bi_end_io handlers */ | 21 | /* bi_end_io handlers */ |
22 | extern void drbd_md_io_complete(struct bio *bio, int error); | 22 | extern void drbd_md_io_complete(struct bio *bio, int error); |
23 | extern void drbd_endio_sec(struct bio *bio, int error); | 23 | extern void drbd_peer_request_endio(struct bio *bio, int error); |
24 | extern void drbd_endio_pri(struct bio *bio, int error); | 24 | extern void drbd_request_endio(struct bio *bio, int error); |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * used to submit our private bio | 27 | * used to submit our private bio |