diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-05-16 11:38:45 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 10:55:54 -0500 |
commit | d659f2aaea1bd2fe9cf68b33d881470678c6ce2b (patch) | |
tree | bab1455003b41a0005c29ae3d6b82b1c94803117 /drivers/block/drbd/drbd_main.c | |
parent | 036b17eaab935541835f4cc1fcbfe62ead5faa55 (diff) |
drbd: Send PROTOCOL_UPDATE packets when appropriate
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_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 4133335e6e46..dab0a75c63b5 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -911,7 +911,7 @@ int drbd_send_sync_param(struct drbd_conf *mdev) | |||
911 | return drbd_send_command(mdev, sock, cmd, size, NULL, 0); | 911 | return drbd_send_command(mdev, sock, cmd, size, NULL, 0); |
912 | } | 912 | } |
913 | 913 | ||
914 | int __drbd_send_protocol(struct drbd_tconn *tconn) | 914 | int __drbd_send_protocol(struct drbd_tconn *tconn, enum drbd_packet cmd) |
915 | { | 915 | { |
916 | struct drbd_socket *sock; | 916 | struct drbd_socket *sock; |
917 | struct p_protocol *p; | 917 | struct p_protocol *p; |
@@ -953,7 +953,7 @@ int __drbd_send_protocol(struct drbd_tconn *tconn) | |||
953 | strcpy(p->integrity_alg, nc->integrity_alg); | 953 | strcpy(p->integrity_alg, nc->integrity_alg); |
954 | rcu_read_unlock(); | 954 | rcu_read_unlock(); |
955 | 955 | ||
956 | return __conn_send_command(tconn, sock, P_PROTOCOL, size, NULL, 0); | 956 | return __conn_send_command(tconn, sock, cmd, size, NULL, 0); |
957 | } | 957 | } |
958 | 958 | ||
959 | int drbd_send_protocol(struct drbd_tconn *tconn) | 959 | int drbd_send_protocol(struct drbd_tconn *tconn) |
@@ -961,7 +961,7 @@ int drbd_send_protocol(struct drbd_tconn *tconn) | |||
961 | int err; | 961 | int err; |
962 | 962 | ||
963 | mutex_lock(&tconn->data.mutex); | 963 | mutex_lock(&tconn->data.mutex); |
964 | err = __drbd_send_protocol(tconn); | 964 | err = __drbd_send_protocol(tconn, P_PROTOCOL); |
965 | mutex_unlock(&tconn->data.mutex); | 965 | mutex_unlock(&tconn->data.mutex); |
966 | 966 | ||
967 | return err; | 967 | return err; |