Re: [PATCH v6 06/25] rtrs: client: main functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/3/20 6:30 AM, Jinpu Wang wrote:
On Tue, Dec 31, 2019 at 12:53 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
On 2019-12-30 02:29, Jack Wang wrote:
+static void complete_rdma_req(struct rtrs_clt_io_req *req, int errno,
+                           bool notify, bool can_wait)
+{
+     struct rtrs_clt_con *con = req->con;
+     struct rtrs_clt_sess *sess;
+     int err;
+
+     if (WARN_ON(!req->in_use))
+             return;
+     if (WARN_ON(!req->con))
+             return;
+     sess = to_clt_sess(con->c.sess);
+
+     if (req->sg_cnt) {
+             if (unlikely(req->dir == DMA_FROM_DEVICE && req->need_inv)) {
+                     /*
+                      * We are here to invalidate RDMA read requests
+                      * ourselves.  In normal scenario server should
+                      * send INV for all requested RDMA reads, but
+                      * we are here, thus two things could happen:
+                      *
+                      *    1.  this is failover, when errno != 0
+                      *        and can_wait == 1,
+                      *
+                      *    2.  something totally bad happened and
+                      *        server forgot to send INV, so we
+                      *        should do that ourselves.
+                      */

Please document in the protocol documentation when RDMA reads are used.
We don't use RDMA READ, it's requested RDMA read meaning, server side will do
RDMA write to the buffers.

Please make the comment more clear. The comment says "RDMA read" twice.

Thanks,

Bart.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux