Skip to content

Commit

Permalink
drbd: Move drbd_send_ping() and drbd_send_ping_ack() to drbd_main.c
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 0916e0e commit e307f35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -1939,17 +1939,8 @@ static inline int drbd_send_short_cmd(struct drbd_conf *mdev,
return drbd_send_cmd(mdev, &mdev->tconn->data, cmd, &h, sizeof(h));
}

static inline int drbd_send_ping(struct drbd_tconn *tconn)
{
struct p_header h;
return !conn_send_cmd(tconn, 0, &tconn->meta, P_PING, &h, sizeof(h));
}

static inline int drbd_send_ping_ack(struct drbd_tconn *tconn)
{
struct p_header h;
return !conn_send_cmd(tconn, 0, &tconn->meta, P_PING_ACK, &h, sizeof(h));
}
extern int drbd_send_ping(struct drbd_tconn *tconn);
extern int drbd_send_ping_ack(struct drbd_tconn *tconn);

static inline int drbd_send_state_req(struct drbd_conf *mdev,
union drbd_state mask, union drbd_state val)
Expand Down
12 changes: 12 additions & 0 deletions drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,18 @@ int conn_send_cmd2(struct drbd_tconn *tconn, enum drbd_packet cmd, char *data,
return err;
}

int drbd_send_ping(struct drbd_tconn *tconn)
{
struct p_header h;
return !conn_send_cmd(tconn, 0, &tconn->meta, P_PING, &h, sizeof(h));
}

int drbd_send_ping_ack(struct drbd_tconn *tconn)
{
struct p_header h;
return !conn_send_cmd(tconn, 0, &tconn->meta, P_PING_ACK, &h, sizeof(h));
}

int drbd_send_sync_param(struct drbd_conf *mdev)
{
struct p_rs_param_95 *p;
Expand Down

0 comments on commit e307f35

Please sign in to comment.