]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: add warn log if server got mismatched lossy policy from client
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 20 Oct 2022 02:57:10 +0000 (10:57 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 21 Oct 2022 09:51:29 +0000 (17:51 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/ProtocolV2.cc

index 4df78bc2dcbc7b033dce1dee522eef81d7480a40..7fd4dc273b055fd6eecaf485eb14295c6fb0ed4e 100644 (file)
@@ -1251,6 +1251,12 @@ ProtocolV2::server_connect()
 
     peer_global_seq = client_ident.global_seq();
 
+    bool lossy = client_ident.flags() & CEPH_MSG_CONNECT_LOSSY;
+    if (lossy != conn.policy.lossy) {
+      logger().warn("{} my lossy policy {} doesn't match client {}, ignore",
+                    conn, conn.policy.lossy, lossy);
+    }
+
     // Looks good so far, let's check if there is already an existing connection
     // to this peer.