X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fmsg%2Fasync%2FAsyncConnection.h;h=005b7c13ab29af3f1d618075c362902fa0d3fdf9;hb=31f18b776d001752a193a7cec8bb49033c1a904c;hp=24773afa97fc2842bbbc7e06e329e698c8b7b382;hpb=40152f1e46a80b3405e5558a442ee632198dfd24;p=ceph.git diff --git a/ceph/src/msg/async/AsyncConnection.h b/ceph/src/msg/async/AsyncConnection.h index 24773afa9..005b7c13a 100644 --- a/ceph/src/msg/async/AsyncConnection.h +++ b/ceph/src/msg/async/AsyncConnection.h @@ -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 out_seq{0}; + std::atomic 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 can_write; - bool open_write; - map > > out_q; // priority queue for outbound msgs list sent; // the first bufferlist need to inject seq - bufferlist outcoming_bl; + map > > out_q; // priority queue for outbound msgs bool keepalive; std::mutex lock;