mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
msg/async/rdma: initialize some variables in-class
1. initialize RDMAServerSocketImpl member 2. initialize RDMAConnectedSocketImpl member 3. pollfd::revents Though it won't result in any error here, it's better to initialize the pollfd structure obj's revents to be 0. Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
This commit is contained in:
parent
d557e649c8
commit
30a35bd58f
@ -60,6 +60,7 @@ int RDMAIWARPServerSocketImpl::accept(ConnectedSocket *sock, const SocketOptions
|
||||
struct pollfd pfd = {
|
||||
.fd = cm_channel->fd,
|
||||
.events = POLLIN,
|
||||
.revents = 0,
|
||||
};
|
||||
int ret = poll(&pfd, 1, 0);
|
||||
ceph_assert(ret >= 0);
|
||||
|
@ -274,13 +274,13 @@ class RDMAIWARPConnectedSocketImpl : public RDMAConnectedSocketImpl {
|
||||
void close_notify();
|
||||
|
||||
private:
|
||||
rdma_cm_id *cm_id;
|
||||
rdma_event_channel *cm_channel;
|
||||
rdma_cm_id *cm_id = nullptr;
|
||||
rdma_event_channel *cm_channel = nullptr;
|
||||
EventCallbackRef cm_con_handler;
|
||||
std::mutex close_mtx;
|
||||
std::condition_variable close_condition;
|
||||
bool closed;
|
||||
RDMA_CM_STATUS status;
|
||||
bool closed = false;
|
||||
RDMA_CM_STATUS status = IDLE;
|
||||
|
||||
|
||||
class C_handle_cm_connection : public EventCallback {
|
||||
@ -324,8 +324,8 @@ class RDMAIWARPServerSocketImpl : public RDMAServerSocketImpl {
|
||||
virtual int accept(ConnectedSocket *s, const SocketOptions &opts, entity_addr_t *out, Worker *w) override;
|
||||
virtual void abort_accept() override;
|
||||
private:
|
||||
rdma_cm_id *cm_id;
|
||||
rdma_event_channel *cm_channel;
|
||||
rdma_cm_id *cm_id = nullptr;
|
||||
rdma_event_channel *cm_channel = nullptr;
|
||||
};
|
||||
|
||||
class RDMAStack : public NetworkStack {
|
||||
|
Loading…
Reference in New Issue
Block a user