diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 16:17:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 16:17:26 -0500 |
commit | 18bce371ae09af6c20ee62c1092a4d1d0e84dd49 (patch) | |
tree | f3467fafd8e49392e3f6efef7b88a7b4dd3b7b06 /include | |
parent | ec08bdb148767f1193f5f3028749ed865ac27181 (diff) | |
parent | a8f2800b4f7b76cecb7209cb6a7d2b14904fc711 (diff) |
Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux: (62 commits)
nfsd4: fix callback restarting
nfsd: break lease on unlink, link, and rename
nfsd4: break lease on nfsd setattr
nfsd: don't support msnfs export option
nfsd4: initialize cb_per_client
nfsd4: allow restarting callbacks
nfsd4: simplify nfsd4_cb_prepare
nfsd4: give out delegations more quickly in 4.1 case
nfsd4: add helper function to run callbacks
nfsd4: make sure sequence flags are set after destroy_session
nfsd4: re-probe callback on connection loss
nfsd4: set sequence flag when backchannel is down
nfsd4: keep finer-grained callback status
rpc: allow xprt_class->setup to return a preexisting xprt
rpc: keep backchannel xprt as long as server connection
rpc: move sk_bc_xprt to svc_xprt
nfsd4: allow backchannel recovery
nfsd4: support BIND_CONN_TO_SESSION
nfsd4: modify session list under cl_lock
Documentation: fl_mylease no longer exists
...
Fix up conflicts in fs/nfsd/vfs.c with the vfs-scale work. The
vfs-scale work touched some msnfs cases, and this merge removes support
for that entirely, so the conflict was trivial to resolve.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | include/linux/nfs4.h | 6 | ||||
-rw-r--r-- | include/linux/nfs4_acl.h | 61 | ||||
-rw-r--r-- | include/linux/nfsd/export.h | 2 | ||||
-rw-r--r-- | include/linux/nfsd_idmap.h | 64 | ||||
-rw-r--r-- | include/linux/sunrpc/cache.h | 3 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/svcsock.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 1 |
10 files changed, 13 insertions, 129 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3984f2358d1f..ed6ee473cc8a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1066,7 +1066,6 @@ struct lock_manager_operations { | |||
1066 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 1066 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); |
1067 | void (*fl_release_private)(struct file_lock *); | 1067 | void (*fl_release_private)(struct file_lock *); |
1068 | void (*fl_break)(struct file_lock *); | 1068 | void (*fl_break)(struct file_lock *); |
1069 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | ||
1070 | int (*fl_change)(struct file_lock **, int); | 1069 | int (*fl_change)(struct file_lock **, int); |
1071 | }; | 1070 | }; |
1072 | 1071 | ||
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 9b46300b4305..134716e5e350 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -65,6 +65,9 @@ | |||
65 | 65 | ||
66 | #define NFS4_CDFC4_FORE 0x1 | 66 | #define NFS4_CDFC4_FORE 0x1 |
67 | #define NFS4_CDFC4_BACK 0x2 | 67 | #define NFS4_CDFC4_BACK 0x2 |
68 | #define NFS4_CDFC4_BOTH 0x3 | ||
69 | #define NFS4_CDFC4_FORE_OR_BOTH 0x3 | ||
70 | #define NFS4_CDFC4_BACK_OR_BOTH 0x7 | ||
68 | 71 | ||
69 | #define NFS4_SET_TO_SERVER_TIME 0 | 72 | #define NFS4_SET_TO_SERVER_TIME 0 |
70 | #define NFS4_SET_TO_CLIENT_TIME 1 | 73 | #define NFS4_SET_TO_CLIENT_TIME 1 |
@@ -140,6 +143,9 @@ | |||
140 | #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 | 143 | #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 |
141 | #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 | 144 | #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 |
142 | 145 | ||
146 | #define NFS4_SECINFO_STYLE4_CURRENT_FH 0 | ||
147 | #define NFS4_SECINFO_STYLE4_PARENT 1 | ||
148 | |||
143 | #define NFS4_MAX_UINT64 (~(u64)0) | 149 | #define NFS4_MAX_UINT64 (~(u64)0) |
144 | 150 | ||
145 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | 151 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. |
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h deleted file mode 100644 index c9c05a78e9bb..000000000000 --- a/include/linux/nfs4_acl.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* | ||
2 | * include/linux/nfs4_acl.c | ||
3 | * | ||
4 | * Common NFSv4 ACL handling definitions. | ||
5 | * | ||
6 | * Copyright (c) 2002 The Regents of the University of Michigan. | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Marius Aamodt Eriksen <marius@umich.edu> | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * | ||
15 | * 1. Redistributions of source code must retain the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer. | ||
17 | * 2. Redistributions in binary form must reproduce the above copyright | ||
18 | * notice, this list of conditions and the following disclaimer in the | ||
19 | * documentation and/or other materials provided with the distribution. | ||
20 | * 3. Neither the name of the University nor the names of its | ||
21 | * contributors may be used to endorse or promote products derived | ||
22 | * from this software without specific prior written permission. | ||
23 | * | ||
24 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
25 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
26 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
27 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
31 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
32 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
35 | */ | ||
36 | |||
37 | #ifndef LINUX_NFS4_ACL_H | ||
38 | #define LINUX_NFS4_ACL_H | ||
39 | |||
40 | #include <linux/posix_acl.h> | ||
41 | |||
42 | /* Maximum ACL we'll accept from client; chosen (somewhat arbitrarily) to | ||
43 | * fit in a page: */ | ||
44 | #define NFS4_ACL_MAX 170 | ||
45 | |||
46 | struct nfs4_acl *nfs4_acl_new(int); | ||
47 | int nfs4_acl_get_whotype(char *, u32); | ||
48 | int nfs4_acl_write_who(int who, char *p); | ||
49 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, | ||
50 | uid_t who, u32 mask); | ||
51 | |||
52 | #define NFS4_ACL_TYPE_DEFAULT 0x01 | ||
53 | #define NFS4_ACL_DIR 0x02 | ||
54 | #define NFS4_ACL_OWNER 0x04 | ||
55 | |||
56 | struct nfs4_acl *nfs4_acl_posix_to_nfsv4(struct posix_acl *, | ||
57 | struct posix_acl *, unsigned int flags); | ||
58 | int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *, struct posix_acl **, | ||
59 | struct posix_acl **, unsigned int flags); | ||
60 | |||
61 | #endif /* LINUX_NFS4_ACL_H */ | ||
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 8ae78a61eea4..bd316159278c 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define NFSEXP_NOHIDE 0x0200 | 35 | #define NFSEXP_NOHIDE 0x0200 |
36 | #define NFSEXP_NOSUBTREECHECK 0x0400 | 36 | #define NFSEXP_NOSUBTREECHECK 0x0400 |
37 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ | 37 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ |
38 | #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */ | 38 | #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect; no longer supported */ |
39 | #define NFSEXP_FSID 0x2000 | 39 | #define NFSEXP_FSID 0x2000 |
40 | #define NFSEXP_CROSSMOUNT 0x4000 | 40 | #define NFSEXP_CROSSMOUNT 0x4000 |
41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ | 41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ |
diff --git a/include/linux/nfsd_idmap.h b/include/linux/nfsd_idmap.h deleted file mode 100644 index d4a2ac18bd4c..000000000000 --- a/include/linux/nfsd_idmap.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * include/linux/nfsd_idmap.h | ||
3 | * | ||
4 | * Mapping of UID to name and vice versa. | ||
5 | * | ||
6 | * Copyright (c) 2002, 2003 The Regents of the University of | ||
7 | * Michigan. All rights reserved. | ||
8 | > * | ||
9 | * Marius Aamodt Eriksen <marius@umich.edu> | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * | ||
15 | * 1. Redistributions of source code must retain the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer. | ||
17 | * 2. Redistributions in binary form must reproduce the above copyright | ||
18 | * notice, this list of conditions and the following disclaimer in the | ||
19 | * documentation and/or other materials provided with the distribution. | ||
20 | * 3. Neither the name of the University nor the names of its | ||
21 | * contributors may be used to endorse or promote products derived | ||
22 | * from this software without specific prior written permission. | ||
23 | * | ||
24 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
25 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
26 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
27 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
31 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
32 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
35 | */ | ||
36 | |||
37 | #ifndef LINUX_NFSD_IDMAP_H | ||
38 | #define LINUX_NFSD_IDMAP_H | ||
39 | |||
40 | #include <linux/in.h> | ||
41 | #include <linux/sunrpc/svc.h> | ||
42 | |||
43 | /* XXX from linux/nfs_idmap.h */ | ||
44 | #define IDMAP_NAMESZ 128 | ||
45 | |||
46 | #ifdef CONFIG_NFSD_V4 | ||
47 | int nfsd_idmap_init(void); | ||
48 | void nfsd_idmap_shutdown(void); | ||
49 | #else | ||
50 | static inline int nfsd_idmap_init(void) | ||
51 | { | ||
52 | return 0; | ||
53 | } | ||
54 | static inline void nfsd_idmap_shutdown(void) | ||
55 | { | ||
56 | } | ||
57 | #endif | ||
58 | |||
59 | int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); | ||
60 | int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *); | ||
61 | int nfsd_map_uid_to_name(struct svc_rqst *, __u32, char *); | ||
62 | int nfsd_map_gid_to_name(struct svc_rqst *, __u32, char *); | ||
63 | |||
64 | #endif /* LINUX_NFSD_IDMAP_H */ | ||
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 78aa104250b7..7898ea13de70 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -256,10 +256,13 @@ static inline time_t get_expiry(char **bpp) | |||
256 | return rv - boot.tv_sec; | 256 | return rv - boot.tv_sec; |
257 | } | 257 | } |
258 | 258 | ||
259 | #ifdef CONFIG_NFSD_DEPRECATED | ||
259 | static inline void sunrpc_invalidate(struct cache_head *h, | 260 | static inline void sunrpc_invalidate(struct cache_head *h, |
260 | struct cache_detail *detail) | 261 | struct cache_detail *detail) |
261 | { | 262 | { |
262 | h->expiry_time = seconds_since_boot() - 1; | 263 | h->expiry_time = seconds_since_boot() - 1; |
263 | detail->nextcheck = seconds_since_boot(); | 264 | detail->nextcheck = seconds_since_boot(); |
264 | } | 265 | } |
266 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
267 | |||
265 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ | 268 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index c81d4d8be3a9..ea29330b78bd 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -269,6 +269,7 @@ struct svc_rqst { | |||
269 | struct cache_req rq_chandle; /* handle passed to caches for | 269 | struct cache_req rq_chandle; /* handle passed to caches for |
270 | * request delaying | 270 | * request delaying |
271 | */ | 271 | */ |
272 | bool rq_dropme; | ||
272 | /* Catering to nfsd */ | 273 | /* Catering to nfsd */ |
273 | struct auth_domain * rq_client; /* RPC peer info */ | 274 | struct auth_domain * rq_client; /* RPC peer info */ |
274 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | 275 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 357da5e0daa3..059877b4d85b 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -63,7 +63,6 @@ struct svc_xprt { | |||
63 | #define XPT_LISTENER 11 /* listening endpoint */ | 63 | #define XPT_LISTENER 11 /* listening endpoint */ |
64 | #define XPT_CACHE_AUTH 12 /* cache auth info */ | 64 | #define XPT_CACHE_AUTH 12 /* cache auth info */ |
65 | 65 | ||
66 | struct svc_pool *xpt_pool; /* current pool iff queued */ | ||
67 | struct svc_serv *xpt_server; /* service for transport */ | 66 | struct svc_serv *xpt_server; /* service for transport */ |
68 | atomic_t xpt_reserved; /* space on outq that is rsvd */ | 67 | atomic_t xpt_reserved; /* space on outq that is rsvd */ |
69 | struct mutex xpt_mutex; /* to serialize sending data */ | 68 | struct mutex xpt_mutex; /* to serialize sending data */ |
@@ -81,6 +80,7 @@ struct svc_xprt { | |||
81 | void *xpt_bc_sid; /* back channel session ID */ | 80 | void *xpt_bc_sid; /* back channel session ID */ |
82 | 81 | ||
83 | struct net *xpt_net; | 82 | struct net *xpt_net; |
83 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ | ||
84 | }; | 84 | }; |
85 | 85 | ||
86 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 86 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 1b353a76c304..04dba23c59f2 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -28,7 +28,6 @@ struct svc_sock { | |||
28 | /* private TCP part */ | 28 | /* private TCP part */ |
29 | u32 sk_reclen; /* length of record */ | 29 | u32 sk_reclen; /* length of record */ |
30 | u32 sk_tcplen; /* current read length */ | 30 | u32 sk_tcplen; /* current read length */ |
31 | struct rpc_xprt *sk_bc_xprt; /* NFSv4.1 backchannel xprt */ | ||
32 | }; | 31 | }; |
33 | 32 | ||
34 | /* | 33 | /* |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 89d10d279a20..bef0f535f746 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -321,6 +321,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
321 | #define XPRT_CLOSING (6) | 321 | #define XPRT_CLOSING (6) |
322 | #define XPRT_CONNECTION_ABORT (7) | 322 | #define XPRT_CONNECTION_ABORT (7) |
323 | #define XPRT_CONNECTION_CLOSE (8) | 323 | #define XPRT_CONNECTION_CLOSE (8) |
324 | #define XPRT_INITIALIZED (9) | ||
324 | 325 | ||
325 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 326 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
326 | { | 327 | { |