]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xprtrdma: Add a field of bit flags to struct rpcrdma_req
authorChuck Lever <chuck.lever@oracle.com>
Fri, 20 Oct 2017 14:48:20 +0000 (10:48 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 17 Nov 2017 18:47:57 +0000 (13:47 -0500)
We have one boolean flag in rpcrdma_req today. I'd like to add more
flags, so convert that boolean to a bit flag.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/backchannel.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h

index f0d5998330fe01ab31cf6020fb64526931f95c64..088c9cc259d7e0c6ca7d840275e9b7f8ea5cdc14 100644 (file)
@@ -42,7 +42,7 @@ static int rpcrdma_bc_setup_rqst(struct rpcrdma_xprt *r_xprt,
        req = rpcrdma_create_req(r_xprt);
        if (IS_ERR(req))
                return PTR_ERR(req);
-       req->rl_backchannel = true;
+       __set_bit(RPCRDMA_REQ_F_BACKCHANNEL, &req->rl_flags);
 
        rb = rpcrdma_alloc_regbuf(RPCRDMA_HDRBUF_SIZE,
                                  DMA_TO_DEVICE, GFP_KERNEL);
index 7be6e2519197c40a981f08b7533243d5133b239c..acdb2e9c72c8fe22167d58b859d9a65f5de4b83b 100644 (file)
@@ -680,7 +680,7 @@ xprt_rdma_free(struct rpc_task *task)
        struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
        struct rpcrdma_ia *ia = &r_xprt->rx_ia;
 
-       if (req->rl_backchannel)
+       if (test_bit(RPCRDMA_REQ_F_BACKCHANNEL, &req->rl_flags))
                return;
 
        dprintk("RPC:       %s: called on 0x%p\n", __func__, req->rl_reply);
index 1bf7b1ee569944c7f270c01c2875eb7bc84b1224..bab63adf070ba1db63911e0e1774e14371a5e374 100644 (file)
@@ -1167,7 +1167,6 @@ rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt)
                        rc = PTR_ERR(req);
                        goto out;
                }
-               req->rl_backchannel = false;
                list_add(&req->rl_list, &buf->rb_send_bufs);
        }
 
index 537cfabe47d190c5b60ce441474879ae94748545..417532069842f84b94f40d608ab05732cc07e597 100644 (file)
@@ -377,12 +377,17 @@ struct rpcrdma_req {
        struct rpcrdma_regbuf   *rl_recvbuf;    /* rq_rcv_buf */
 
        struct list_head        rl_all;
-       bool                    rl_backchannel;
+       unsigned long           rl_flags;
 
        struct list_head        rl_registered;  /* registered segments */
        struct rpcrdma_mr_seg   rl_segments[RPCRDMA_MAX_SEGS];
 };
 
+/* rl_flags */
+enum {
+       RPCRDMA_REQ_F_BACKCHANNEL = 0,
+};
+
 static inline void
 rpcrdma_set_xprtdata(struct rpc_rqst *rqst, struct rpcrdma_req *req)
 {