lkml.org 
[lkml]   [2017]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [[PATCH v1] 23/37] [CIFS] SMBD: Implement API for upper layer to reconnect transport
Date
> -----Original Message-----
> From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs-
> owner@vger.kernel.org] On Behalf Of Long Li
> Sent: Wednesday, August 2, 2017 4:11 PM
> To: Steve French <sfrench@samba.org>; linux-cifs@vger.kernel.org; samba-
> technical@lists.samba.org; linux-kernel@vger.kernel.org
> Cc: Long Li <longli@microsoft.com>
> Subject: [[PATCH v1] 23/37] [CIFS] SMBD: Implement API for upper layer to
> reconnect transport
>
> +int cifs_reconnect_rdma_session(struct TCP_Server_Info *server)
> +{
> + log_rdma_event("reconnecting rdma session\n");
> +
> + // why reconnect while it is still connected?
> + if (server->rdma_ses->transport_status == CIFS_RDMA_CONNECTED) {
> + log_rdma_event("still connected, not reconnecting\n");
> + return -EINVAL;
> + }

Why is this check needed?

> +
> + // wait until the transport is destroyed
> + while (server->rdma_ses->transport_status != CIFS_RDMA_DESTROYED)
> + msleep(1);

Polling!? Please plan to implement a proper handshake for connection logic.

\
 
 \ /
  Last update: 2017-08-14 23:03    [W:0.423 / U:2.068 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site