diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-03-16 14:53:19 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:44:43 +0100 |
commit | b2f0ab62ecfe8711fefb82223b40430f8141a949 (patch) | |
tree | 351d99364bf05fb239404895c8995c56e428c482 /drivers/block/drbd/drbd_worker.c | |
parent | drbd: drbd_send_short_cmd(): Return 0 upon success and an error code otherwise (diff) | |
download | linux-b2f0ab62ecfe8711fefb82223b40430f8141a949.tar.xz linux-b2f0ab62ecfe8711fefb82223b40430f8141a949.zip |
drbd: Temporarily change the return type of all worker callbacks
This helps to ensure that we don't miss one of them when changing their
return value semantics.
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_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 0dd2f2d81de2..d38bf70a16df 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -39,8 +39,6 @@ #include "drbd_req.h" static int w_make_ov_request(struct drbd_work *w, int cancel); -static int w_make_resync_request(struct drbd_work *w, int cancel); - /* endio handlers: @@ -227,7 +225,7 @@ void drbd_request_endio(struct bio *bio, int error) complete_master_bio(mdev, &m); } -int w_read_retry_remote(struct drbd_work *w, int cancel) +long w_read_retry_remote(struct drbd_work *w, int cancel) { struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_conf *mdev = w->mdev; @@ -296,7 +294,7 @@ void drbd_csum_bio(struct drbd_conf *mdev, struct crypto_hash *tfm, struct bio * } /* MAYBE merge common code with w_e_end_ov_req */ -static int w_e_send_csum(struct drbd_work *w, int cancel) +static long w_e_send_csum(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -383,7 +381,7 @@ defer: return -EAGAIN; } -int w_resync_timer(struct drbd_work *w, int cancel) +long w_resync_timer(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; switch (mdev->state.conn) { @@ -505,7 +503,7 @@ static int drbd_rs_number_requests(struct drbd_conf *mdev) return number; } -static int w_make_resync_request(struct drbd_work *w, int cancel) +long w_make_resync_request(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; unsigned long bit; @@ -709,7 +707,7 @@ static int w_make_ov_request(struct drbd_work *w, int cancel) return 1; } -int w_ov_finished(struct drbd_work *w, int cancel) +long w_ov_finished(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; kfree(w); @@ -719,7 +717,7 @@ int w_ov_finished(struct drbd_work *w, int cancel) return 1; } -static int w_resync_finished(struct drbd_work *w, int cancel) +static long w_resync_finished(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; kfree(w); @@ -907,7 +905,7 @@ static void move_to_net_ee_or_free(struct drbd_conf *mdev, struct drbd_peer_requ * @w: work object. * @cancel: The connection will be closed anyways */ -int w_e_end_data_req(struct drbd_work *w, int cancel) +long w_e_end_data_req(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -944,7 +942,7 @@ int w_e_end_data_req(struct drbd_work *w, int cancel) * @w: work object. * @cancel: The connection will be closed anyways */ -int w_e_end_rsdata_req(struct drbd_work *w, int cancel) +long w_e_end_rsdata_req(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -993,7 +991,7 @@ int w_e_end_rsdata_req(struct drbd_work *w, int cancel) return ok; } -int w_e_end_csum_rs_req(struct drbd_work *w, int cancel) +long w_e_end_csum_rs_req(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -1056,7 +1054,7 @@ int w_e_end_csum_rs_req(struct drbd_work *w, int cancel) return ok; } -int w_e_end_ov_req(struct drbd_work *w, int cancel) +long w_e_end_ov_req(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -1114,7 +1112,7 @@ void drbd_ov_oos_found(struct drbd_conf *mdev, sector_t sector, int size) drbd_set_out_of_sync(mdev, sector, size); } -int w_e_end_ov_reply(struct drbd_work *w, int cancel) +long w_e_end_ov_reply(struct drbd_work *w, int cancel) { struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w); struct drbd_conf *mdev = w->mdev; @@ -1182,7 +1180,7 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel) return ok; } -int w_prev_work_done(struct drbd_work *w, int cancel) +long w_prev_work_done(struct drbd_work *w, int cancel) { struct drbd_wq_barrier *b = container_of(w, struct drbd_wq_barrier, w); @@ -1190,7 +1188,7 @@ int w_prev_work_done(struct drbd_work *w, int cancel) return 1; } -int w_send_barrier(struct drbd_work *w, int cancel) +long w_send_barrier(struct drbd_work *w, int cancel) { struct drbd_tl_epoch *b = container_of(w, struct drbd_tl_epoch, w); struct drbd_conf *mdev = w->mdev; @@ -1222,7 +1220,7 @@ int w_send_barrier(struct drbd_work *w, int cancel) return ok; } -int w_send_write_hint(struct drbd_work *w, int cancel) +long w_send_write_hint(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; if (cancel) @@ -1230,7 +1228,7 @@ int w_send_write_hint(struct drbd_work *w, int cancel) return !drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE); } -int w_send_oos(struct drbd_work *w, int cancel) +long w_send_oos(struct drbd_work *w, int cancel) { struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_conf *mdev = w->mdev; @@ -1253,7 +1251,7 @@ int w_send_oos(struct drbd_work *w, int cancel) * @w: work object. * @cancel: The connection will be closed anyways */ -int w_send_dblock(struct drbd_work *w, int cancel) +long w_send_dblock(struct drbd_work *w, int cancel) { struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_conf *mdev = w->mdev; @@ -1276,7 +1274,7 @@ int w_send_dblock(struct drbd_work *w, int cancel) * @w: work object. * @cancel: The connection will be closed anyways */ -int w_send_read_req(struct drbd_work *w, int cancel) +long w_send_read_req(struct drbd_work *w, int cancel) { struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_conf *mdev = w->mdev; @@ -1295,7 +1293,7 @@ int w_send_read_req(struct drbd_work *w, int cancel) return ok; } -int w_restart_disk_io(struct drbd_work *w, int cancel) +long w_restart_disk_io(struct drbd_work *w, int cancel) { struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_conf *mdev = w->mdev; @@ -1452,7 +1450,7 @@ void start_resync_timer_fn(unsigned long data) drbd_queue_work(&mdev->tconn->data.work, &mdev->start_resync_work); } -int w_start_resync(struct drbd_work *w, int cancel) +long w_start_resync(struct drbd_work *w, int cancel) { struct drbd_conf *mdev = w->mdev; |