mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
NFS client fixes for Linux 4.17-rc4
Bugfixes: - Fix a possible NFSoRDMA list corruption during recovery - Fix sunrpc tracepoint crashes Other change: - Update Trond's email in the MAINTAINERS file -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAlr2ABEACgkQ18tUv7Cl QOvLew//WipZ1of+dZpiGa95pqVKBrIxq5R1y8LACmEKaiyfHOOoFcaopI7YDU1r OkBRZkldMLKOSGZsQ9xEjh3OOPgW60oInFZ2sD2qjnph23x09IcDbiCp8iJ0PTFI iD9ioUKc3h7FSl0pJQSjIo9+9fFsTZzIioxP7tDZt2Kog5OMIZeWAqRIj1xmgu5i TX793gTFJ+SfMSkvWZM5oOHVEmW/oXAgWsgaVXEqkdjK2JI6KYKqAgMj0CLvvNIo S2eeJjbyd9Hl59lDo50NzrZEQESlPYod6ZDfEOmF50mxC3MCLlmtAgwXKknVaY1N 1L4tFuBoXBLV0jctBztuqMIDKXncoNlsCvr38WqkBaFxikKpK8dFqeByh+wCTdtz pwMPHFDQmQB1mIwqzQa+O6MAZ5n3a/cgyWQtoymlq5ddQU3roB2euWXRmaoXPudY SnmEVYxq839Ukw16qNa1HkKkroy8Zzqr5+sS30w/l916U9/S3ZolXF+XU5ux+6hQ Mlu9aW5SCP4S5QresaAcjPcBdLvbjN8/h/I8bdCmPRCGVKSkcxSz2MZYUli8UxAq tht4tQtuCY1XInQPnuf20egnJnrhpgQjb8Xx5BvTtcEkFvz9F36lzK4ot0lqQzTo tGDDW8gpeskt0Z1PC4eD1gq/E+FSywP7gg/g32AMdk2GpCewBog= =xfe9 -----END PGP SIGNATURE----- Merge tag 'nfs-for-4.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "These patches fix both a possible corruption during NFSoRDMA MR recovery, and a sunrpc tracepoint crash. Additionally, Trond has a new email address to put in the MAINTAINERS file" * tag 'nfs-for-4.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: Change Trond's email address in MAINTAINERS sunrpc: Fix latency trace point crashes xprtrdma: Fix list corruption / DMAR errors during MR recovery
This commit is contained in:
commit
a1f45efbb9
@ -9873,7 +9873,7 @@ F: include/linux/platform_data/nxp-nci.h
|
||||
F: Documentation/devicetree/bindings/net/nfc/
|
||||
|
||||
NFS, SUNRPC, AND LOCKD CLIENTS
|
||||
M: Trond Myklebust <trond.myklebust@primarydata.com>
|
||||
M: Trond Myklebust <trond.myklebust@hammerspace.com>
|
||||
M: Anna Schumaker <anna.schumaker@netapp.com>
|
||||
L: linux-nfs@vger.kernel.org
|
||||
W: http://client.linux-nfs.org
|
||||
|
@ -224,6 +224,8 @@ TRACE_EVENT(rpc_stats_latency,
|
||||
TP_ARGS(task, backlog, rtt, execute),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, task_id)
|
||||
__field(unsigned int, client_id)
|
||||
__field(u32, xid)
|
||||
__field(int, version)
|
||||
__string(progname, task->tk_client->cl_program->name)
|
||||
@ -231,13 +233,11 @@ TRACE_EVENT(rpc_stats_latency,
|
||||
__field(unsigned long, backlog)
|
||||
__field(unsigned long, rtt)
|
||||
__field(unsigned long, execute)
|
||||
__string(addr,
|
||||
task->tk_xprt->address_strings[RPC_DISPLAY_ADDR])
|
||||
__string(port,
|
||||
task->tk_xprt->address_strings[RPC_DISPLAY_PORT])
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->client_id = task->tk_client->cl_clid;
|
||||
__entry->task_id = task->tk_pid;
|
||||
__entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid);
|
||||
__entry->version = task->tk_client->cl_vers;
|
||||
__assign_str(progname, task->tk_client->cl_program->name)
|
||||
@ -245,14 +245,10 @@ TRACE_EVENT(rpc_stats_latency,
|
||||
__entry->backlog = ktime_to_us(backlog);
|
||||
__entry->rtt = ktime_to_us(rtt);
|
||||
__entry->execute = ktime_to_us(execute);
|
||||
__assign_str(addr,
|
||||
task->tk_xprt->address_strings[RPC_DISPLAY_ADDR]);
|
||||
__assign_str(port,
|
||||
task->tk_xprt->address_strings[RPC_DISPLAY_PORT]);
|
||||
),
|
||||
|
||||
TP_printk("peer=[%s]:%s xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu",
|
||||
__get_str(addr), __get_str(port), __entry->xid,
|
||||
TP_printk("task:%u@%d xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu",
|
||||
__entry->task_id, __entry->client_id, __entry->xid,
|
||||
__get_str(progname), __entry->version, __get_str(procname),
|
||||
__entry->backlog, __entry->rtt, __entry->execute)
|
||||
);
|
||||
|
@ -72,6 +72,7 @@ fmr_op_init_mr(struct rpcrdma_ia *ia, struct rpcrdma_mr *mr)
|
||||
if (IS_ERR(mr->fmr.fm_mr))
|
||||
goto out_fmr_err;
|
||||
|
||||
INIT_LIST_HEAD(&mr->mr_list);
|
||||
return 0;
|
||||
|
||||
out_fmr_err:
|
||||
@ -102,10 +103,6 @@ fmr_op_release_mr(struct rpcrdma_mr *mr)
|
||||
LIST_HEAD(unmap_list);
|
||||
int rc;
|
||||
|
||||
/* Ensure MW is not on any rl_registered list */
|
||||
if (!list_empty(&mr->mr_list))
|
||||
list_del(&mr->mr_list);
|
||||
|
||||
kfree(mr->fmr.fm_physaddrs);
|
||||
kfree(mr->mr_sg);
|
||||
|
||||
|
@ -110,6 +110,7 @@ frwr_op_init_mr(struct rpcrdma_ia *ia, struct rpcrdma_mr *mr)
|
||||
if (!mr->mr_sg)
|
||||
goto out_list_err;
|
||||
|
||||
INIT_LIST_HEAD(&mr->mr_list);
|
||||
sg_init_table(mr->mr_sg, depth);
|
||||
init_completion(&frwr->fr_linv_done);
|
||||
return 0;
|
||||
@ -133,10 +134,6 @@ frwr_op_release_mr(struct rpcrdma_mr *mr)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* Ensure MR is not on any rl_registered list */
|
||||
if (!list_empty(&mr->mr_list))
|
||||
list_del(&mr->mr_list);
|
||||
|
||||
rc = ib_dereg_mr(mr->frwr.fr_mr);
|
||||
if (rc)
|
||||
pr_err("rpcrdma: final ib_dereg_mr for %p returned %i\n",
|
||||
@ -195,7 +192,7 @@ frwr_op_recover_mr(struct rpcrdma_mr *mr)
|
||||
return;
|
||||
|
||||
out_release:
|
||||
pr_err("rpcrdma: FRWR reset failed %d, %p release\n", rc, mr);
|
||||
pr_err("rpcrdma: FRWR reset failed %d, %p released\n", rc, mr);
|
||||
r_xprt->rx_stats.mrs_orphaned++;
|
||||
|
||||
spin_lock(&r_xprt->rx_buf.rb_mrlock);
|
||||
@ -476,7 +473,7 @@ frwr_op_reminv(struct rpcrdma_rep *rep, struct list_head *mrs)
|
||||
|
||||
list_for_each_entry(mr, mrs, mr_list)
|
||||
if (mr->mr_handle == rep->rr_inv_rkey) {
|
||||
list_del(&mr->mr_list);
|
||||
list_del_init(&mr->mr_list);
|
||||
trace_xprtrdma_remoteinv(mr);
|
||||
mr->frwr.fr_state = FRWR_IS_INVALID;
|
||||
rpcrdma_mr_unmap_and_put(mr);
|
||||
|
@ -1254,6 +1254,11 @@ rpcrdma_mrs_destroy(struct rpcrdma_buffer *buf)
|
||||
list_del(&mr->mr_all);
|
||||
|
||||
spin_unlock(&buf->rb_mrlock);
|
||||
|
||||
/* Ensure MW is not on any rl_registered list */
|
||||
if (!list_empty(&mr->mr_list))
|
||||
list_del(&mr->mr_list);
|
||||
|
||||
ia->ri_ops->ro_release_mr(mr);
|
||||
count++;
|
||||
spin_lock(&buf->rb_mrlock);
|
||||
|
@ -380,7 +380,7 @@ rpcrdma_mr_pop(struct list_head *list)
|
||||
struct rpcrdma_mr *mr;
|
||||
|
||||
mr = list_first_entry(list, struct rpcrdma_mr, mr_list);
|
||||
list_del(&mr->mr_list);
|
||||
list_del_init(&mr->mr_list);
|
||||
return mr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user