diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-01-26 17:11:47 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2015-01-30 12:18:48 -0500 |
commit | a0a1d50cd1e80652142af5cddcde500d06c71bdd (patch) | |
tree | 996b9d3d431441d50efe63369cde5b04c0909075 /net | |
parent | df515ca7b3b47bf6fd489fe6fca0d9ab243e1985 (diff) |
xprtrdma: Update the GFP flags used in xprt_rdma_allocate()
Reflect the more conservative approach used in the socket transport's
version of this transport method. An RPC buffer allocation should
avoid forcing not just FS activity, but any I/O.
In particular, two recent changes missed updating xprtrdma:
- Commit c6c8fe79a83e ("net, sunrpc: suppress allocation warning ...")
- Commit a564b8f03986 ("nfs: enable swap on NFS")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 2c2fabe99d84..2e192baa59f3 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -463,13 +463,16 @@ xprt_rdma_allocate(struct rpc_task *task, size_t size) | |||
463 | struct rpcrdma_regbuf *rb; | 463 | struct rpcrdma_regbuf *rb; |
464 | struct rpcrdma_req *req; | 464 | struct rpcrdma_req *req; |
465 | size_t min_size; | 465 | size_t min_size; |
466 | gfp_t flags = task->tk_flags & RPC_TASK_SWAPPER ? | 466 | gfp_t flags; |
467 | GFP_ATOMIC : GFP_NOFS; | ||
468 | 467 | ||
469 | req = rpcrdma_buffer_get(&r_xprt->rx_buf); | 468 | req = rpcrdma_buffer_get(&r_xprt->rx_buf); |
470 | if (req == NULL) | 469 | if (req == NULL) |
471 | return NULL; | 470 | return NULL; |
472 | 471 | ||
472 | flags = GFP_NOIO | __GFP_NOWARN; | ||
473 | if (RPC_IS_SWAPPER(task)) | ||
474 | flags = __GFP_MEMALLOC | GFP_NOWAIT | __GFP_NOWARN; | ||
475 | |||
473 | if (req->rl_rdmabuf == NULL) | 476 | if (req->rl_rdmabuf == NULL) |
474 | goto out_rdmabuf; | 477 | goto out_rdmabuf; |
475 | if (req->rl_sendbuf == NULL) | 478 | if (req->rl_sendbuf == NULL) |