aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:19:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:19:15 -0400
commitbf97293eb878df3792d9de7213bd7b82135aea77 (patch)
tree16cb367bd78095b9eb8a54c800fcddfcccb618c7 /fs/nfs/callback_proc.c
parent16d70e15295953b19ecf59e943723a181782b856 (diff)
parentb1b3e136948a2bf4915326acb0d825d7d180753f (diff)
Merge tag 'nfs-for-3.12-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: - Fix NFSv4 recovery so that it doesn't recover lost locks in cases such as lease loss due to a network partition, where doing so may result in data corruption. Add a kernel parameter to control choice of legacy behaviour or not. - Performance improvements when 2 processes are writing to the same file. - Flush data to disk when an RPCSEC_GSS session timeout is imminent. - Implement NFSv4.1 SP4_MACH_CRED state protection to prevent other NFS clients from being able to manipulate our lease and file locking state. - Allow sharing of RPCSEC_GSS caches between different rpc clients. - Fix the broken NFSv4 security auto-negotiation between client and server. - Fix rmdir() to wait for outstanding sillyrename unlinks to complete - Add a tracepoint framework for debugging NFSv4 state recovery issues. - Add tracing to the generic NFS layer. - Add tracing for the SUNRPC socket connection state. - Clean up the rpc_pipefs mount/umount event management. - Merge more patches from Chuck in preparation for NFSv4 migration support" * tag 'nfs-for-3.12-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (107 commits) NFSv4: use mach cred for SECINFO_NO_NAME w/ integrity NFS: nfs_compare_super shouldn't check the auth flavour unless 'sec=' was set NFSv4: Allow security autonegotiation for submounts NFSv4: Disallow security negotiation for lookups when 'sec=' is specified NFSv4: Fix security auto-negotiation NFS: Clean up nfs_parse_security_flavors() NFS: Clean up the auth flavour array mess NFSv4.1 Use MDS auth flavor for data server connection NFS: Don't check lock owner compatability unless file is locked (part 2) NFS: Don't check lock owner compatibility in writes unless file is locked nfs4: Map NFS4ERR_WRONG_CRED to EPERM nfs4.1: Add SP4_MACH_CRED write and commit support nfs4.1: Add SP4_MACH_CRED stateid support nfs4.1: Add SP4_MACH_CRED secinfo support nfs4.1: Add SP4_MACH_CRED cleanup support nfs4.1: Add state protection handler nfs4.1: Minimal SP4_MACH_CRED implementation SUNRPC: Replace pointer values with task->tk_pid and rpc_clnt->cl_clid SUNRPC: Add an identifier for struct rpc_clnt SUNRPC: Ensure rpc_task->tk_pid is available for tracepoints ...
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index e6ebc4c38c81..ae2e87b95453 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -15,6 +15,7 @@
15#include "internal.h" 15#include "internal.h"
16#include "pnfs.h" 16#include "pnfs.h"
17#include "nfs4session.h" 17#include "nfs4session.h"
18#include "nfs4trace.h"
18 19
19#ifdef NFS_DEBUG 20#ifdef NFS_DEBUG
20#define NFSDBG_FACILITY NFSDBG_CALLBACK 21#define NFSDBG_FACILITY NFSDBG_CALLBACK
@@ -93,6 +94,7 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
93 default: 94 default:
94 res = htonl(NFS4ERR_RESOURCE); 95 res = htonl(NFS4ERR_RESOURCE);
95 } 96 }
97 trace_nfs4_recall_delegation(inode, -ntohl(res));
96 iput(inode); 98 iput(inode);
97out: 99out:
98 dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); 100 dprintk("%s: exit with status = %d\n", __func__, ntohl(res));
@@ -301,14 +303,14 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
301{ 303{
302 struct nfs4_slot *slot; 304 struct nfs4_slot *slot;
303 305
304 dprintk("%s enter. slotid %d seqid %d\n", 306 dprintk("%s enter. slotid %u seqid %u\n",
305 __func__, args->csa_slotid, args->csa_sequenceid); 307 __func__, args->csa_slotid, args->csa_sequenceid);
306 308
307 if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS) 309 if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS)
308 return htonl(NFS4ERR_BADSLOT); 310 return htonl(NFS4ERR_BADSLOT);
309 311
310 slot = tbl->slots + args->csa_slotid; 312 slot = tbl->slots + args->csa_slotid;
311 dprintk("%s slot table seqid: %d\n", __func__, slot->seq_nr); 313 dprintk("%s slot table seqid: %u\n", __func__, slot->seq_nr);
312 314
313 /* Normal */ 315 /* Normal */
314 if (likely(args->csa_sequenceid == slot->seq_nr + 1)) { 316 if (likely(args->csa_sequenceid == slot->seq_nr + 1)) {
@@ -318,7 +320,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
318 320
319 /* Replay */ 321 /* Replay */
320 if (args->csa_sequenceid == slot->seq_nr) { 322 if (args->csa_sequenceid == slot->seq_nr) {
321 dprintk("%s seqid %d is a replay\n", 323 dprintk("%s seqid %u is a replay\n",
322 __func__, args->csa_sequenceid); 324 __func__, args->csa_sequenceid);
323 /* Signal process_op to set this error on next op */ 325 /* Signal process_op to set this error on next op */
324 if (args->csa_cachethis == 0) 326 if (args->csa_cachethis == 0)
@@ -462,6 +464,7 @@ out:
462 } else 464 } else
463 res->csr_status = status; 465 res->csr_status = status;
464 466
467 trace_nfs4_cb_sequence(args, res, status);
465 dprintk("%s: exit with status = %d res->csr_status %d\n", __func__, 468 dprintk("%s: exit with status = %d res->csr_status %d\n", __func__,
466 ntohl(status), ntohl(res->csr_status)); 469 ntohl(status), ntohl(res->csr_status));
467 return status; 470 return status;
@@ -518,7 +521,7 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
518 if (!cps->clp) /* set in cb_sequence */ 521 if (!cps->clp) /* set in cb_sequence */
519 goto out; 522 goto out;
520 523
521 dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n", 524 dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %u\n",
522 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR), 525 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR),
523 args->crsa_target_highest_slotid); 526 args->crsa_target_highest_slotid);
524 527