]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/msg/async/AsyncConnection.h
update sources to v12.1.0
[ceph.git] / ceph / src / msg / async / AsyncConnection.h
index 24773afa97fc2842bbbc7e06e329e698c8b7b382..005b7c13ab29af3f1d618075c362902fa0d3fdf9 100644 (file)
@@ -294,8 +294,8 @@ class AsyncConnection : public Connection {
   PerfCounters *logger;
   int global_seq;
   __u32 connect_seq, peer_global_seq;
-  atomic64_t out_seq;
-  atomic64_t ack_left, in_seq;
+  std::atomic<uint64_t> out_seq{0};
+  std::atomic<uint64_t> ack_left{0}, in_seq{0};
   int state;
   int state_after_send;
   ConnectedSocket cs;
@@ -304,6 +304,10 @@ class AsyncConnection : public Connection {
 
   DispatchQueue *dispatch_queue;
 
+  // lockfree, only used in own thread
+  bufferlist outcoming_bl;
+  bool open_write = false;
+
   std::mutex write_lock;
   enum class WriteStatus {
     NOWRITE,
@@ -312,10 +316,8 @@ class AsyncConnection : public Connection {
     CLOSED
   };
   std::atomic<WriteStatus> can_write;
-  bool open_write;
-  map<int, list<pair<bufferlist, Message*> > > out_q;  // priority queue for outbound msgs
   list<Message*> sent; // the first bufferlist need to inject seq
-  bufferlist outcoming_bl;
+  map<int, list<pair<bufferlist, Message*> > > out_q;  // priority queue for outbound msgs
   bool keepalive;
 
   std::mutex lock;