aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-03-28 10:44:40 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:45:00 -0500
commite5d6f33abe9da025d3d891367f93d084e8c74bf5 (patch)
tree3370e45763fe4e3690bfccd9d3bfba78d94eda04 /drivers/block/drbd/drbd_receiver.c
parent7c96715aa8ef1b5375c0d2a2d3bb1da99d95a39e (diff)
drbd: Change how the initial packets are called
The first packets exchanged when a connection is established are referred to as P_HAND_SHAKE_S and P_HAND_SHAKE_M in the code, followed by P_HAND_SHAKE packets. To avoid confusion between these two unrelated things, call the initial packets P_INITIAL_DATA and P_INITIAL_META. 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_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 40cecd6c7e33..a5bf2b5042e2 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -833,10 +833,10 @@ static int drbd_connect(struct drbd_tconn *tconn)
833 if (s) { 833 if (s) {
834 if (!tconn->data.socket) { 834 if (!tconn->data.socket) {
835 tconn->data.socket = s; 835 tconn->data.socket = s;
836 drbd_send_fp(tconn, &tconn->data, P_HAND_SHAKE_S); 836 drbd_send_fp(tconn, &tconn->data, P_INITIAL_DATA);
837 } else if (!tconn->meta.socket) { 837 } else if (!tconn->meta.socket) {
838 tconn->meta.socket = s; 838 tconn->meta.socket = s;
839 drbd_send_fp(tconn, &tconn->meta, P_HAND_SHAKE_M); 839 drbd_send_fp(tconn, &tconn->meta, P_INITIAL_META);
840 } else { 840 } else {
841 conn_err(tconn, "Logic error in drbd_connect()\n"); 841 conn_err(tconn, "Logic error in drbd_connect()\n");
842 goto out_release_sockets; 842 goto out_release_sockets;
@@ -858,14 +858,14 @@ retry:
858 drbd_socket_okay(&tconn->data.socket); 858 drbd_socket_okay(&tconn->data.socket);
859 drbd_socket_okay(&tconn->meta.socket); 859 drbd_socket_okay(&tconn->meta.socket);
860 switch (try) { 860 switch (try) {
861 case P_HAND_SHAKE_S: 861 case P_INITIAL_DATA:
862 if (tconn->data.socket) { 862 if (tconn->data.socket) {
863 conn_warn(tconn, "initial packet S crossed\n"); 863 conn_warn(tconn, "initial packet S crossed\n");
864 sock_release(tconn->data.socket); 864 sock_release(tconn->data.socket);
865 } 865 }
866 tconn->data.socket = s; 866 tconn->data.socket = s;
867 break; 867 break;
868 case P_HAND_SHAKE_M: 868 case P_INITIAL_META:
869 if (tconn->meta.socket) { 869 if (tconn->meta.socket) {
870 conn_warn(tconn, "initial packet M crossed\n"); 870 conn_warn(tconn, "initial packet M crossed\n");
871 sock_release(tconn->meta.socket); 871 sock_release(tconn->meta.socket);