Commit 8f7bed77 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: Rename various functions from *_oos_* to *_out_of_sync_* for clarity

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 0da34df0
...@@ -1191,7 +1191,7 @@ extern void drbd_send_ack_dp(struct drbd_conf *mdev, enum drbd_packet cmd, ...@@ -1191,7 +1191,7 @@ extern void drbd_send_ack_dp(struct drbd_conf *mdev, enum drbd_packet cmd,
struct p_data *dp, int data_size); struct p_data *dp, int data_size);
extern int drbd_send_ack_ex(struct drbd_conf *mdev, enum drbd_packet cmd, extern int drbd_send_ack_ex(struct drbd_conf *mdev, enum drbd_packet cmd,
sector_t sector, int blksize, u64 block_id); sector_t sector, int blksize, u64 block_id);
extern int drbd_send_oos(struct drbd_conf *mdev, struct drbd_request *req); extern int drbd_send_out_of_sync(struct drbd_conf *, struct drbd_request *);
extern int drbd_send_block(struct drbd_conf *, enum drbd_packet, extern int drbd_send_block(struct drbd_conf *, enum drbd_packet,
struct drbd_peer_request *); struct drbd_peer_request *);
extern int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req); extern int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req);
...@@ -1528,10 +1528,10 @@ extern int drbd_resync_finished(struct drbd_conf *mdev); ...@@ -1528,10 +1528,10 @@ extern int drbd_resync_finished(struct drbd_conf *mdev);
/* maybe rather drbd_main.c ? */ /* maybe rather drbd_main.c ? */
extern int drbd_md_sync_page_io(struct drbd_conf *mdev, extern int drbd_md_sync_page_io(struct drbd_conf *mdev,
struct drbd_backing_dev *bdev, sector_t sector, int rw); struct drbd_backing_dev *bdev, sector_t sector, int rw);
extern void drbd_ov_oos_found(struct drbd_conf*, sector_t, int); extern void drbd_ov_out_of_sync_found(struct drbd_conf *, sector_t, int);
extern void drbd_rs_controller_reset(struct drbd_conf *mdev); extern void drbd_rs_controller_reset(struct drbd_conf *mdev);
static inline void ov_oos_print(struct drbd_conf *mdev) static inline void ov_out_of_sync_print(struct drbd_conf *mdev)
{ {
if (mdev->ov_last_oos_size) { if (mdev->ov_last_oos_size) {
dev_err(DEV, "Out of sync: start=%llu, size=%lu (sectors)\n", dev_err(DEV, "Out of sync: start=%llu, size=%lu (sectors)\n",
...@@ -1562,7 +1562,7 @@ extern int w_send_read_req(struct drbd_work *, int); ...@@ -1562,7 +1562,7 @@ extern int w_send_read_req(struct drbd_work *, int);
extern int w_prev_work_done(struct drbd_work *, int); extern int w_prev_work_done(struct drbd_work *, int);
extern int w_e_reissue(struct drbd_work *, int); extern int w_e_reissue(struct drbd_work *, int);
extern int w_restart_disk_io(struct drbd_work *, int); extern int w_restart_disk_io(struct drbd_work *, int);
extern int w_send_oos(struct drbd_work *, int); extern int w_send_out_of_sync(struct drbd_work *, int);
extern int w_start_resync(struct drbd_work *, int); extern int w_start_resync(struct drbd_work *, int);
extern void resync_timer_fn(unsigned long data); extern void resync_timer_fn(unsigned long data);
......
...@@ -1652,7 +1652,7 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packet cmd, ...@@ -1652,7 +1652,7 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packet cmd,
return err; return err;
} }
int drbd_send_oos(struct drbd_conf *mdev, struct drbd_request *req) int drbd_send_out_of_sync(struct drbd_conf *mdev, struct drbd_request *req)
{ {
struct p_block_desc p; struct p_block_desc p;
......
...@@ -4699,9 +4699,9 @@ static int got_OVResult(struct drbd_conf *mdev, enum drbd_packet cmd) ...@@ -4699,9 +4699,9 @@ static int got_OVResult(struct drbd_conf *mdev, enum drbd_packet cmd)
update_peer_seq(mdev, be32_to_cpu(p->seq_num)); update_peer_seq(mdev, be32_to_cpu(p->seq_num));
if (be64_to_cpu(p->block_id) == ID_OUT_OF_SYNC) if (be64_to_cpu(p->block_id) == ID_OUT_OF_SYNC)
drbd_ov_oos_found(mdev, sector, size); drbd_ov_out_of_sync_found(mdev, sector, size);
else else
ov_oos_print(mdev); ov_out_of_sync_print(mdev);
if (!get_ldev(mdev)) if (!get_ldev(mdev))
return true; return true;
...@@ -4723,7 +4723,7 @@ static int got_OVResult(struct drbd_conf *mdev, enum drbd_packet cmd) ...@@ -4723,7 +4723,7 @@ static int got_OVResult(struct drbd_conf *mdev, enum drbd_packet cmd)
drbd_queue_work_front(&mdev->tconn->data.work, w); drbd_queue_work_front(&mdev->tconn->data.work, w);
} else { } else {
dev_err(DEV, "kmalloc(w) failed."); dev_err(DEV, "kmalloc(w) failed.");
ov_oos_print(mdev); ov_out_of_sync_print(mdev);
drbd_resync_finished(mdev); drbd_resync_finished(mdev);
} }
} }
......
...@@ -477,7 +477,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what, ...@@ -477,7 +477,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
case QUEUE_FOR_SEND_OOS: case QUEUE_FOR_SEND_OOS:
req->rq_state |= RQ_NET_QUEUED; req->rq_state |= RQ_NET_QUEUED;
req->w.cb = w_send_oos; req->w.cb = w_send_out_of_sync;
drbd_queue_work(&mdev->tconn->data.work, &req->w); drbd_queue_work(&mdev->tconn->data.work, &req->w);
break; break;
...@@ -786,7 +786,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s ...@@ -786,7 +786,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
} }
remote = remote && drbd_should_do_remote(mdev->state); remote = remote && drbd_should_do_remote(mdev->state);
send_oos = rw == WRITE && drbd_should_send_oos(mdev->state); send_oos = rw == WRITE && drbd_should_send_out_of_sync(mdev->state);
D_ASSERT(!(remote && send_oos)); D_ASSERT(!(remote && send_oos));
if (!(local || remote) && !is_susp(mdev->state)) { if (!(local || remote) && !is_susp(mdev->state)) {
...@@ -842,7 +842,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s ...@@ -842,7 +842,7 @@ int __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long s
if (remote || send_oos) { if (remote || send_oos) {
remote = drbd_should_do_remote(mdev->state); remote = drbd_should_do_remote(mdev->state);
send_oos = rw == WRITE && drbd_should_send_oos(mdev->state); send_oos = rw == WRITE && drbd_should_send_out_of_sync(mdev->state);
D_ASSERT(!(remote && send_oos)); D_ASSERT(!(remote && send_oos));
if (!(remote || send_oos)) if (!(remote || send_oos))
......
...@@ -305,7 +305,7 @@ static inline bool drbd_should_do_remote(union drbd_state s) ...@@ -305,7 +305,7 @@ static inline bool drbd_should_do_remote(union drbd_state s)
That is equivalent since before 96 IO was frozen in the C_WF_BITMAP* That is equivalent since before 96 IO was frozen in the C_WF_BITMAP*
states. */ states. */
} }
static inline bool drbd_should_send_oos(union drbd_state s) static inline bool drbd_should_send_out_of_sync(union drbd_state s)
{ {
return s.conn == C_AHEAD || s.conn == C_WF_BITMAP_S; return s.conn == C_AHEAD || s.conn == C_WF_BITMAP_S;
/* pdsk = D_INCONSISTENT as a consequence. Protocol 96 check not necessary /* pdsk = D_INCONSISTENT as a consequence. Protocol 96 check not necessary
......
...@@ -714,7 +714,7 @@ int w_ov_finished(struct drbd_work *w, int cancel) ...@@ -714,7 +714,7 @@ int w_ov_finished(struct drbd_work *w, int cancel)
{ {
struct drbd_conf *mdev = w->mdev; struct drbd_conf *mdev = w->mdev;
kfree(w); kfree(w);
ov_oos_print(mdev); ov_out_of_sync_print(mdev);
drbd_resync_finished(mdev); drbd_resync_finished(mdev);
return 0; return 0;
...@@ -1102,7 +1102,7 @@ int w_e_end_ov_req(struct drbd_work *w, int cancel) ...@@ -1102,7 +1102,7 @@ int w_e_end_ov_req(struct drbd_work *w, int cancel)
return err; return err;
} }
void drbd_ov_oos_found(struct drbd_conf *mdev, sector_t sector, int size) void drbd_ov_out_of_sync_found(struct drbd_conf *mdev, sector_t sector, int size)
{ {
if (mdev->ov_last_oos_start + mdev->ov_last_oos_size == sector) { if (mdev->ov_last_oos_start + mdev->ov_last_oos_size == sector) {
mdev->ov_last_oos_size += size>>9; mdev->ov_last_oos_size += size>>9;
...@@ -1158,9 +1158,9 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel) ...@@ -1158,9 +1158,9 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel)
* drbd_pp_alloc due to pp_in_use > max_buffers. */ * drbd_pp_alloc due to pp_in_use > max_buffers. */
drbd_free_ee(mdev, peer_req); drbd_free_ee(mdev, peer_req);
if (!eq) if (!eq)
drbd_ov_oos_found(mdev, sector, size); drbd_ov_out_of_sync_found(mdev, sector, size);
else else
ov_oos_print(mdev); ov_out_of_sync_print(mdev);
err = drbd_send_ack_ex(mdev, P_OV_RESULT, sector, size, err = drbd_send_ack_ex(mdev, P_OV_RESULT, sector, size,
eq ? ID_IN_SYNC : ID_OUT_OF_SYNC); eq ? ID_IN_SYNC : ID_OUT_OF_SYNC);
...@@ -1174,7 +1174,7 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel) ...@@ -1174,7 +1174,7 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel)
drbd_advance_rs_marks(mdev, mdev->ov_left); drbd_advance_rs_marks(mdev, mdev->ov_left);
if (mdev->ov_left == 0) { if (mdev->ov_left == 0) {
ov_oos_print(mdev); ov_out_of_sync_print(mdev);
drbd_resync_finished(mdev); drbd_resync_finished(mdev);
} }
...@@ -1230,7 +1230,7 @@ int w_send_write_hint(struct drbd_work *w, int cancel) ...@@ -1230,7 +1230,7 @@ int w_send_write_hint(struct drbd_work *w, int cancel)
return drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE); return drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE);
} }
int w_send_oos(struct drbd_work *w, int cancel) int w_send_out_of_sync(struct drbd_work *w, int cancel)
{ {
struct drbd_request *req = container_of(w, struct drbd_request, w); struct drbd_request *req = container_of(w, struct drbd_request, w);
struct drbd_conf *mdev = w->mdev; struct drbd_conf *mdev = w->mdev;
...@@ -1241,7 +1241,7 @@ int w_send_oos(struct drbd_work *w, int cancel) ...@@ -1241,7 +1241,7 @@ int w_send_oos(struct drbd_work *w, int cancel)
return 0; return 0;
} }
err = drbd_send_oos(mdev, req); err = drbd_send_out_of_sync(mdev, req);
req_mod(req, OOS_HANDED_TO_NETWORK); req_mod(req, OOS_HANDED_TO_NETWORK);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment