aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-10 10:52:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-10 10:52:35 -0400
commitdf632d3ce7eacf92ad9b642301c7b53a1d95b8d8 (patch)
tree848c39ed4f7cfdb582bf2e0a0a03147efaa5198d /include/linux
parent2474542f64432398f503373f53bdf620491bcfa8 (diff)
parentaf283885b70248268617955a5ea5476647bd556b (diff)
Merge tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Features include: - Remove CONFIG_EXPERIMENTAL dependency from NFSv4.1 Aside from the issues discussed at the LKS, distros are shipping NFSv4.1 with all the trimmings. - Fix fdatasync()/fsync() for the corner case of a server reboot. - NFSv4 OPEN access fix: finally distinguish correctly between open-for-read and open-for-execute permissions in all situations. - Ensure that the TCP socket is closed when we're in CLOSE_WAIT - More idmapper bugfixes - Lots of pNFS bugfixes and cleanups to remove unnecessary state and make the code easier to read. - In cases where a pNFS read or write fails, allow the client to resume trying layoutgets after two minutes of read/write- through-mds. - More net namespace fixes to the NFSv4 callback code. - More net namespace fixes to the NFSv3 locking code. - More NFSv4 migration preparatory patches. Including patches to detect network trunking in both NFSv4 and NFSv4.1 - pNFS block updates to optimise LAYOUTGET calls." * tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (113 commits) pnfsblock: cleanup nfs4_blkdev_get NFS41: send real read size in layoutget NFS41: send real write size in layoutget NFS: track direct IO left bytes NFSv4.1: Cleanup ugliness in pnfs_layoutgets_blocked() NFSv4.1: Ensure that the layout sequence id stays 'close' to the current NFSv4.1: Deal with seqid wraparound in the pNFS return-on-close code NFSv4 set open access operation call flag in nfs4_init_opendata_res NFSv4.1: Remove the dependency on CONFIG_EXPERIMENTAL NFSv4 reduce attribute requests for open reclaim NFSv4: nfs4_open_done first must check that GETATTR decoded a file type NFSv4.1: Deal with wraparound when updating the layout "barrier" seqid NFSv4.1: Deal with wraparound issues when updating the layout stateid NFSv4.1: Always set the layout stateid if this is the first layoutget NFSv4.1: Fix another refcount issue in pnfs_find_alloc_layout NFSv4: don't put ACCESS in OPEN compound if O_EXCL NFSv4: don't check MAY_WRITE access bit in OPEN NFS: Set key construction data for the legacy upcall NFSv4.1: don't do two EXCHANGE_IDs on mount NFS: nfs41_walk_client_list(): re-lock before iterating ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h11
-rw-r--r--include/linux/nfs_fs_sb.h3
-rw-r--r--include/linux/nfs_xdr.h5
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/xprt.h3
5 files changed, 19 insertions, 5 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 4b03f56e280e..334a2f5f6bf1 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -81,12 +81,16 @@ struct nfs_access_entry {
81 int mask; 81 int mask;
82}; 82};
83 83
84struct nfs_lockowner {
85 fl_owner_t l_owner;
86 pid_t l_pid;
87};
88
84struct nfs_lock_context { 89struct nfs_lock_context {
85 atomic_t count; 90 atomic_t count;
86 struct list_head list; 91 struct list_head list;
87 struct nfs_open_context *open_context; 92 struct nfs_open_context *open_context;
88 fl_owner_t lockowner; 93 struct nfs_lockowner lockowner;
89 pid_t pid;
90}; 94};
91 95
92struct nfs4_state; 96struct nfs4_state;
@@ -99,6 +103,7 @@ struct nfs_open_context {
99 103
100 unsigned long flags; 104 unsigned long flags;
101#define NFS_CONTEXT_ERROR_WRITE (0) 105#define NFS_CONTEXT_ERROR_WRITE (0)
106#define NFS_CONTEXT_RESEND_WRITES (1)
102 int error; 107 int error;
103 108
104 struct list_head list; 109 struct list_head list;
@@ -355,6 +360,8 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
355extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); 360extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
356extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); 361extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr);
357extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 362extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
363extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);
364extern void nfs_access_set_mask(struct nfs_access_entry *, u32);
358extern int nfs_permission(struct inode *, int); 365extern int nfs_permission(struct inode *, int);
359extern int nfs_open(struct inode *, struct file *); 366extern int nfs_open(struct inode *, struct file *);
360extern int nfs_release(struct inode *, struct file *); 367extern int nfs_release(struct inode *, struct file *);
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 310c63c8ab2c..a9e76ee1adca 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -39,6 +39,7 @@ struct nfs_client {
39 unsigned long cl_flags; /* behavior switches */ 39 unsigned long cl_flags; /* behavior switches */
40#define NFS_CS_NORESVPORT 0 /* - use ephemeral src port */ 40#define NFS_CS_NORESVPORT 0 /* - use ephemeral src port */
41#define NFS_CS_DISCRTRY 1 /* - disconnect on RPC retry */ 41#define NFS_CS_DISCRTRY 1 /* - disconnect on RPC retry */
42#define NFS_CS_MIGRATION 2 /* - transparent state migr */
42 struct sockaddr_storage cl_addr; /* server identifier */ 43 struct sockaddr_storage cl_addr; /* server identifier */
43 size_t cl_addrlen; 44 size_t cl_addrlen;
44 char * cl_hostname; /* hostname of server */ 45 char * cl_hostname; /* hostname of server */
@@ -81,6 +82,7 @@ struct nfs_client {
81 /* The flags used for obtaining the clientid during EXCHANGE_ID */ 82 /* The flags used for obtaining the clientid during EXCHANGE_ID */
82 u32 cl_exchange_flags; 83 u32 cl_exchange_flags;
83 struct nfs4_session *cl_session; /* shared session */ 84 struct nfs4_session *cl_session; /* shared session */
85 bool cl_preserve_clid;
84 struct nfs41_server_owner *cl_serverowner; 86 struct nfs41_server_owner *cl_serverowner;
85 struct nfs41_server_scope *cl_serverscope; 87 struct nfs41_server_scope *cl_serverscope;
86 struct nfs41_impl_id *cl_implid; 88 struct nfs41_impl_id *cl_implid;
@@ -125,6 +127,7 @@ struct nfs_server {
125 unsigned int namelen; 127 unsigned int namelen;
126 unsigned int options; /* extra options enabled by mount */ 128 unsigned int options; /* extra options enabled by mount */
127#define NFS_OPTION_FSCACHE 0x00000001 /* - local caching enabled */ 129#define NFS_OPTION_FSCACHE 0x00000001 /* - local caching enabled */
130#define NFS_OPTION_MIGRATION 0x00000002 /* - NFSv4 migration enabled */
128 131
129 struct nfs_fsid fsid; 132 struct nfs_fsid fsid;
130 __u64 maxfilesize; /* maximum file size */ 133 __u64 maxfilesize; /* maximum file size */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index be9cf3c7e79e..a73ea89789d1 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -251,7 +251,6 @@ struct nfs4_layoutget_res {
251struct nfs4_layoutget { 251struct nfs4_layoutget {
252 struct nfs4_layoutget_args args; 252 struct nfs4_layoutget_args args;
253 struct nfs4_layoutget_res res; 253 struct nfs4_layoutget_res res;
254 struct pnfs_layout_segment **lsegpp;
255 gfp_t gfp_flags; 254 gfp_t gfp_flags;
256}; 255};
257 256
@@ -335,6 +334,7 @@ struct nfs_openargs {
335 struct nfs_seqid * seqid; 334 struct nfs_seqid * seqid;
336 int open_flags; 335 int open_flags;
337 fmode_t fmode; 336 fmode_t fmode;
337 u32 access;
338 __u64 clientid; 338 __u64 clientid;
339 struct stateowner_id id; 339 struct stateowner_id id;
340 union { 340 union {
@@ -369,6 +369,9 @@ struct nfs_openres {
369 struct nfs4_string *owner; 369 struct nfs4_string *owner;
370 struct nfs4_string *group_owner; 370 struct nfs4_string *group_owner;
371 struct nfs4_sequence_res seq_res; 371 struct nfs4_sequence_res seq_res;
372 __u32 access_request;
373 __u32 access_supported;
374 __u32 access_result;
372}; 375};
373 376
374/* 377/*
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 523547ecfee2..34206b84d8da 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -130,6 +130,8 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
130 const struct rpc_program *, u32); 130 const struct rpc_program *, u32);
131void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); 131void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt);
132struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); 132struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
133struct rpc_clnt *rpc_clone_client_set_auth(struct rpc_clnt *,
134 rpc_authflavor_t);
133void rpc_shutdown_client(struct rpc_clnt *); 135void rpc_shutdown_client(struct rpc_clnt *);
134void rpc_release_client(struct rpc_clnt *); 136void rpc_release_client(struct rpc_clnt *);
135void rpc_task_release_client(struct rpc_task *); 137void rpc_task_release_client(struct rpc_task *);
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index bf8c49ff7530..951cb9b7d02b 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -173,8 +173,7 @@ struct rpc_xprt {
173 unsigned int min_reqs; /* min number of slots */ 173 unsigned int min_reqs; /* min number of slots */
174 atomic_t num_reqs; /* total slots */ 174 atomic_t num_reqs; /* total slots */
175 unsigned long state; /* transport state */ 175 unsigned long state; /* transport state */
176 unsigned char shutdown : 1, /* being shut down */ 176 unsigned char resvport : 1; /* use a reserved port */
177 resvport : 1; /* use a reserved port */
178 unsigned int swapper; /* we're swapping over this 177 unsigned int swapper; /* we're swapping over this
179 transport */ 178 transport */
180 unsigned int bind_index; /* bind function index */ 179 unsigned int bind_index; /* bind function index */