Skip to content

Commit 531cca0

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Add a field of bit flags to struct rpcrdma_req
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>
1 parent ae72950 commit 531cca0

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

net/sunrpc/xprtrdma/backchannel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static int rpcrdma_bc_setup_rqst(struct rpcrdma_xprt *r_xprt,
4242
req = rpcrdma_create_req(r_xprt);
4343
if (IS_ERR(req))
4444
return PTR_ERR(req);
45-
req->rl_backchannel = true;
45+
__set_bit(RPCRDMA_REQ_F_BACKCHANNEL, &req->rl_flags);
4646

4747
rb = rpcrdma_alloc_regbuf(RPCRDMA_HDRBUF_SIZE,
4848
DMA_TO_DEVICE, GFP_KERNEL);

net/sunrpc/xprtrdma/transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ xprt_rdma_free(struct rpc_task *task)
680680
struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
681681
struct rpcrdma_ia *ia = &r_xprt->rx_ia;
682682

683-
if (req->rl_backchannel)
683+
if (test_bit(RPCRDMA_REQ_F_BACKCHANNEL, &req->rl_flags))
684684
return;
685685

686686
dprintk("RPC: %s: called on 0x%p\n", __func__, req->rl_reply);

net/sunrpc/xprtrdma/verbs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,6 @@ rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt)
11671167
rc = PTR_ERR(req);
11681168
goto out;
11691169
}
1170-
req->rl_backchannel = false;
11711170
list_add(&req->rl_list, &buf->rb_send_bufs);
11721171
}
11731172

net/sunrpc/xprtrdma/xprt_rdma.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,17 @@ struct rpcrdma_req {
377377
struct rpcrdma_regbuf *rl_recvbuf; /* rq_rcv_buf */
378378

379379
struct list_head rl_all;
380-
bool rl_backchannel;
380+
unsigned long rl_flags;
381381

382382
struct list_head rl_registered; /* registered segments */
383383
struct rpcrdma_mr_seg rl_segments[RPCRDMA_MAX_SEGS];
384384
};
385385

386+
/* rl_flags */
387+
enum {
388+
RPCRDMA_REQ_F_BACKCHANNEL = 0,
389+
};
390+
386391
static inline void
387392
rpcrdma_set_xprtdata(struct rpc_rqst *rqst, struct rpcrdma_req *req)
388393
{

0 commit comments

Comments
 (0)