Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFS: Fix an Oops in the NFSv4 atomic open code NFS: Fix the selection of security flavours in Kconfig NFS: fix the return value of nfs_file_fsync() rpcrdma: Fix SQ size calculation when memreg is FRMR xprtrdma: Do not truncate iova_start values in frmr registrations. nfs: Remove redundant NULL check upon kfree() nfs: Add "lookupcache" to displayed mount options NFS: allow close-to-open cache semantics to apply to root of NFS filesystem SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494)
This commit is contained in:
+5
-4
@@ -18,10 +18,11 @@ config SUNRPC_XPRT_RDMA
|
||||
If unsure, say N.
|
||||
|
||||
config RPCSEC_GSS_KRB5
|
||||
tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
|
||||
depends on SUNRPC && EXPERIMENTAL
|
||||
tristate
|
||||
depends on SUNRPC && CRYPTO
|
||||
prompt "Secure RPC: Kerberos V mechanism" if !(NFS_V4 || NFSD_V4)
|
||||
default y
|
||||
select SUNRPC_GSS
|
||||
select CRYPTO
|
||||
select CRYPTO_MD5
|
||||
select CRYPTO_DES
|
||||
select CRYPTO_CBC
|
||||
@@ -34,7 +35,7 @@ config RPCSEC_GSS_KRB5
|
||||
available from http://linux-nfs.org/. In addition, user-space
|
||||
Kerberos support should be installed.
|
||||
|
||||
If unsure, say N.
|
||||
If unsure, say Y.
|
||||
|
||||
config RPCSEC_GSS_SPKM3
|
||||
tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)"
|
||||
|
||||
@@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
|
||||
req->rl_nchunks = nchunks;
|
||||
|
||||
BUG_ON(nchunks == 0);
|
||||
BUG_ON((r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_FRMR)
|
||||
&& (nchunks > 3));
|
||||
|
||||
/*
|
||||
* finish off header. If write, marshal discrim and nchunks.
|
||||
|
||||
@@ -650,10 +650,22 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
|
||||
ep->rep_attr.cap.max_send_wr = cdata->max_requests;
|
||||
switch (ia->ri_memreg_strategy) {
|
||||
case RPCRDMA_FRMR:
|
||||
/* Add room for frmr register and invalidate WRs */
|
||||
ep->rep_attr.cap.max_send_wr *= 3;
|
||||
if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr)
|
||||
return -EINVAL;
|
||||
/* Add room for frmr register and invalidate WRs.
|
||||
* 1. FRMR reg WR for head
|
||||
* 2. FRMR invalidate WR for head
|
||||
* 3. FRMR reg WR for pagelist
|
||||
* 4. FRMR invalidate WR for pagelist
|
||||
* 5. FRMR reg WR for tail
|
||||
* 6. FRMR invalidate WR for tail
|
||||
* 7. The RDMA_SEND WR
|
||||
*/
|
||||
ep->rep_attr.cap.max_send_wr *= 7;
|
||||
if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr) {
|
||||
cdata->max_requests = devattr.max_qp_wr / 7;
|
||||
if (!cdata->max_requests)
|
||||
return -EINVAL;
|
||||
ep->rep_attr.cap.max_send_wr = cdata->max_requests * 7;
|
||||
}
|
||||
break;
|
||||
case RPCRDMA_MEMWINDOWS_ASYNC:
|
||||
case RPCRDMA_MEMWINDOWS:
|
||||
@@ -1490,7 +1502,7 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
|
||||
memset(&frmr_wr, 0, sizeof frmr_wr);
|
||||
frmr_wr.opcode = IB_WR_FAST_REG_MR;
|
||||
frmr_wr.send_flags = 0; /* unsignaled */
|
||||
frmr_wr.wr.fast_reg.iova_start = (unsigned long)seg1->mr_dma;
|
||||
frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma;
|
||||
frmr_wr.wr.fast_reg.page_list = seg1->mr_chunk.rl_mw->r.frmr.fr_pgl;
|
||||
frmr_wr.wr.fast_reg.page_list_len = i;
|
||||
frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT;
|
||||
|
||||
+22
-6
@@ -1305,10 +1305,11 @@ static void xs_tcp_state_change(struct sock *sk)
|
||||
if (!(xprt = xprt_from_sock(sk)))
|
||||
goto out;
|
||||
dprintk("RPC: xs_tcp_state_change client %p...\n", xprt);
|
||||
dprintk("RPC: state %x conn %d dead %d zapped %d\n",
|
||||
dprintk("RPC: state %x conn %d dead %d zapped %d sk_shutdown %d\n",
|
||||
sk->sk_state, xprt_connected(xprt),
|
||||
sock_flag(sk, SOCK_DEAD),
|
||||
sock_flag(sk, SOCK_ZAPPED));
|
||||
sock_flag(sk, SOCK_ZAPPED),
|
||||
sk->sk_shutdown);
|
||||
|
||||
switch (sk->sk_state) {
|
||||
case TCP_ESTABLISHED:
|
||||
@@ -1779,10 +1780,25 @@ static void xs_tcp_reuse_connection(struct rpc_xprt *xprt, struct sock_xprt *tra
|
||||
{
|
||||
unsigned int state = transport->inet->sk_state;
|
||||
|
||||
if (state == TCP_CLOSE && transport->sock->state == SS_UNCONNECTED)
|
||||
return;
|
||||
if ((1 << state) & (TCPF_ESTABLISHED|TCPF_SYN_SENT))
|
||||
return;
|
||||
if (state == TCP_CLOSE && transport->sock->state == SS_UNCONNECTED) {
|
||||
/* we don't need to abort the connection if the socket
|
||||
* hasn't undergone a shutdown
|
||||
*/
|
||||
if (transport->inet->sk_shutdown == 0)
|
||||
return;
|
||||
dprintk("RPC: %s: TCP_CLOSEd and sk_shutdown set to %d\n",
|
||||
__func__, transport->inet->sk_shutdown);
|
||||
}
|
||||
if ((1 << state) & (TCPF_ESTABLISHED|TCPF_SYN_SENT)) {
|
||||
/* we don't need to abort the connection if the socket
|
||||
* hasn't undergone a shutdown
|
||||
*/
|
||||
if (transport->inet->sk_shutdown == 0)
|
||||
return;
|
||||
dprintk("RPC: %s: ESTABLISHED/SYN_SENT "
|
||||
"sk_shutdown set to %d\n",
|
||||
__func__, transport->inet->sk_shutdown);
|
||||
}
|
||||
xs_abort_connection(xprt, transport);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user