diff options
author | Andreas Gruenbacher <andreas.gruenbacher@gmail.com> | 2014-09-11 08:29:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-11 10:41:29 -0400 |
commit | ed15b795092637f61c08fd21dc011b5334d7974c (patch) | |
tree | daee91c3747a6c82d1b290189a6e1c8ae9cd272a | |
parent | 11f8b2b69d32d43a6d9b45c60c1fee48ab91f440 (diff) |
drbd: Use consistent names for all the bi_end_io callbacks
Now they follow the _endio naming sheme.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 4 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 6 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index d26a3fa63688..a2dfa169237d 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -158,14 +158,14 @@ static int _drbd_md_sync_page_io(struct drbd_device *device, | |||
158 | if (bio_add_page(bio, device->md_io.page, size, 0) != size) | 158 | if (bio_add_page(bio, device->md_io.page, size, 0) != size) |
159 | goto out; | 159 | goto out; |
160 | bio->bi_private = device; | 160 | bio->bi_private = device; |
161 | bio->bi_end_io = drbd_md_io_complete; | 161 | bio->bi_end_io = drbd_md_endio; |
162 | bio->bi_rw = rw; | 162 | bio->bi_rw = rw; |
163 | 163 | ||
164 | if (!(rw & WRITE) && device->state.disk == D_DISKLESS && device->ldev == NULL) | 164 | if (!(rw & WRITE) && device->state.disk == D_DISKLESS && device->ldev == NULL) |
165 | /* special case, drbd_md_read() during drbd_adm_attach(): no get_ldev */ | 165 | /* special case, drbd_md_read() during drbd_adm_attach(): no get_ldev */ |
166 | ; | 166 | ; |
167 | else if (!get_ldev_if_state(device, D_ATTACHING)) { | 167 | else if (!get_ldev_if_state(device, D_ATTACHING)) { |
168 | /* Corresponding put_ldev in drbd_md_io_complete() */ | 168 | /* Corresponding put_ldev in drbd_md_endio() */ |
169 | drbd_err(device, "ASSERT FAILED: get_ldev_if_state() == 1 in _drbd_md_sync_page_io()\n"); | 169 | drbd_err(device, "ASSERT FAILED: get_ldev_if_state() == 1 in _drbd_md_sync_page_io()\n"); |
170 | err = -ENODEV; | 170 | err = -ENODEV; |
171 | goto out; | 171 | goto out; |
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 426c97aef900..434c77dcc99e 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c | |||
@@ -941,7 +941,7 @@ static void drbd_bm_aio_ctx_destroy(struct kref *kref) | |||
941 | } | 941 | } |
942 | 942 | ||
943 | /* bv_page may be a copy, or may be the original */ | 943 | /* bv_page may be a copy, or may be the original */ |
944 | static void bm_async_io_complete(struct bio *bio, int error) | 944 | static void drbd_bm_endio(struct bio *bio, int error) |
945 | { | 945 | { |
946 | struct drbd_bm_aio_ctx *ctx = bio->bi_private; | 946 | struct drbd_bm_aio_ctx *ctx = bio->bi_private; |
947 | struct drbd_device *device = ctx->device; | 947 | struct drbd_device *device = ctx->device; |
@@ -1027,7 +1027,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho | |||
1027 | * according to api. Do we want to assert that? */ | 1027 | * according to api. Do we want to assert that? */ |
1028 | bio_add_page(bio, page, len, 0); | 1028 | bio_add_page(bio, page, len, 0); |
1029 | bio->bi_private = ctx; | 1029 | bio->bi_private = ctx; |
1030 | bio->bi_end_io = bm_async_io_complete; | 1030 | bio->bi_end_io = drbd_bm_endio; |
1031 | 1031 | ||
1032 | if (drbd_insert_fault(device, (rw & WRITE) ? DRBD_FAULT_MD_WR : DRBD_FAULT_MD_RD)) { | 1032 | if (drbd_insert_fault(device, (rw & WRITE) ? DRBD_FAULT_MD_WR : DRBD_FAULT_MD_RD)) { |
1033 | bio->bi_rw |= rw; | 1033 | bio->bi_rw |= rw; |
@@ -1125,7 +1125,7 @@ static int bm_rw(struct drbd_device *device, const unsigned int flags, unsigned | |||
1125 | } | 1125 | } |
1126 | 1126 | ||
1127 | /* | 1127 | /* |
1128 | * We initialize ctx->in_flight to one to make sure bm_async_io_complete | 1128 | * We initialize ctx->in_flight to one to make sure drbd_bm_endio |
1129 | * will not set ctx->done early, and decrement / test it here. If there | 1129 | * will not set ctx->done early, and decrement / test it here. If there |
1130 | * are still some bios in flight, we need to wait for them here. | 1130 | * are still some bios in flight, we need to wait for them here. |
1131 | * If all IO is done already (or nothing had been submitted), there is | 1131 | * If all IO is done already (or nothing had been submitted), there is |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 9e1288e4148c..f424dc0c582d 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -1483,7 +1483,7 @@ extern int drbd_khelper(struct drbd_device *device, char *cmd); | |||
1483 | 1483 | ||
1484 | /* drbd_worker.c */ | 1484 | /* drbd_worker.c */ |
1485 | /* bi_end_io handlers */ | 1485 | /* bi_end_io handlers */ |
1486 | extern void drbd_md_io_complete(struct bio *bio, int error); | 1486 | extern void drbd_md_endio(struct bio *bio, int error); |
1487 | extern void drbd_peer_request_endio(struct bio *bio, int error); | 1487 | extern void drbd_peer_request_endio(struct bio *bio, int error); |
1488 | extern void drbd_request_endio(struct bio *bio, int error); | 1488 | extern void drbd_request_endio(struct bio *bio, int error); |
1489 | extern int drbd_worker(struct drbd_thread *thi); | 1489 | extern int drbd_worker(struct drbd_thread *thi); |
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 50776b362828..6e01e62c58a0 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -43,10 +43,10 @@ static int make_ov_request(struct drbd_device *, int); | |||
43 | static int make_resync_request(struct drbd_device *, int); | 43 | static int make_resync_request(struct drbd_device *, int); |
44 | 44 | ||
45 | /* endio handlers: | 45 | /* endio handlers: |
46 | * drbd_md_io_complete (defined here) | 46 | * drbd_md_endio (defined here) |
47 | * drbd_request_endio (defined here) | 47 | * drbd_request_endio (defined here) |
48 | * drbd_peer_request_endio (defined here) | 48 | * drbd_peer_request_endio (defined here) |
49 | * bm_async_io_complete (defined in drbd_bitmap.c) | 49 | * drbd_bm_endio (defined in drbd_bitmap.c) |
50 | * | 50 | * |
51 | * For all these callbacks, note the following: | 51 | * For all these callbacks, note the following: |
52 | * The callbacks will be called in irq context by the IDE drivers, | 52 | * The callbacks will be called in irq context by the IDE drivers, |
@@ -65,7 +65,7 @@ rwlock_t global_state_lock; | |||
65 | /* used for synchronous meta data and bitmap IO | 65 | /* used for synchronous meta data and bitmap IO |
66 | * submitted by drbd_md_sync_page_io() | 66 | * submitted by drbd_md_sync_page_io() |
67 | */ | 67 | */ |
68 | void drbd_md_io_complete(struct bio *bio, int error) | 68 | void drbd_md_endio(struct bio *bio, int error) |
69 | { | 69 | { |
70 | struct drbd_device *device; | 70 | struct drbd_device *device; |
71 | 71 | ||