diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/nfsd/cache.h | 3 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsfh.h | 7 | ||||
| -rw-r--r-- | include/linux/nfsd/state.h | 23 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr4.h | 17 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 7 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 7 |
7 files changed, 39 insertions, 26 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3b534e527e09..58e843b26b98 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1108,6 +1108,7 @@ extern void locks_copy_lock(struct file_lock *, struct file_lock *); | |||
| 1108 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | 1108 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); |
| 1109 | extern void locks_remove_posix(struct file *, fl_owner_t); | 1109 | extern void locks_remove_posix(struct file *, fl_owner_t); |
| 1110 | extern void locks_remove_flock(struct file *); | 1110 | extern void locks_remove_flock(struct file *); |
| 1111 | extern void locks_release_private(struct file_lock *); | ||
| 1111 | extern void posix_test_lock(struct file *, struct file_lock *); | 1112 | extern void posix_test_lock(struct file *, struct file_lock *); |
| 1112 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1113 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
| 1113 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1114 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
diff --git a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h index 5bccaab81056..3a3f58934f5e 100644 --- a/include/linux/nfsd/cache.h +++ b/include/linux/nfsd/cache.h | |||
| @@ -14,8 +14,7 @@ | |||
| 14 | #include <linux/uio.h> | 14 | #include <linux/uio.h> |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Representation of a reply cache entry. The first two members *must* | 17 | * Representation of a reply cache entry. |
| 18 | * be hash_next and hash_prev. | ||
| 19 | */ | 18 | */ |
| 20 | struct svc_cacherep { | 19 | struct svc_cacherep { |
| 21 | struct hlist_node c_hash; | 20 | struct hlist_node c_hash; |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index afa19016c4a8..8f641c908450 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
| @@ -151,9 +151,15 @@ typedef struct svc_fh { | |||
| 151 | __u64 fh_pre_size; /* size before operation */ | 151 | __u64 fh_pre_size; /* size before operation */ |
| 152 | struct timespec fh_pre_mtime; /* mtime before oper */ | 152 | struct timespec fh_pre_mtime; /* mtime before oper */ |
| 153 | struct timespec fh_pre_ctime; /* ctime before oper */ | 153 | struct timespec fh_pre_ctime; /* ctime before oper */ |
| 154 | /* | ||
| 155 | * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode) | ||
| 156 | * to find out if it is valid. | ||
| 157 | */ | ||
| 158 | u64 fh_pre_change; | ||
| 154 | 159 | ||
| 155 | /* Post-op attributes saved in fh_unlock */ | 160 | /* Post-op attributes saved in fh_unlock */ |
| 156 | struct kstat fh_post_attr; /* full attrs after operation */ | 161 | struct kstat fh_post_attr; /* full attrs after operation */ |
| 162 | u64 fh_post_change; /* nfsv4 change; see above */ | ||
| 157 | #endif /* CONFIG_NFSD_V3 */ | 163 | #endif /* CONFIG_NFSD_V3 */ |
| 158 | 164 | ||
| 159 | } svc_fh; | 165 | } svc_fh; |
| @@ -298,6 +304,7 @@ fill_pre_wcc(struct svc_fh *fhp) | |||
| 298 | fhp->fh_pre_mtime = inode->i_mtime; | 304 | fhp->fh_pre_mtime = inode->i_mtime; |
| 299 | fhp->fh_pre_ctime = inode->i_ctime; | 305 | fhp->fh_pre_ctime = inode->i_ctime; |
| 300 | fhp->fh_pre_size = inode->i_size; | 306 | fhp->fh_pre_size = inode->i_size; |
| 307 | fhp->fh_pre_change = inode->i_version; | ||
| 301 | fhp->fh_pre_saved = 1; | 308 | fhp->fh_pre_saved = 1; |
| 302 | } | 309 | } |
| 303 | } | 310 | } |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 4d61c873feed..c0c49215ddc5 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
| @@ -61,15 +61,6 @@ typedef struct { | |||
| 61 | #define si_stateownerid si_opaque.so_stateownerid | 61 | #define si_stateownerid si_opaque.so_stateownerid |
| 62 | #define si_fileid si_opaque.so_fileid | 62 | #define si_fileid si_opaque.so_fileid |
| 63 | 63 | ||
| 64 | |||
| 65 | struct nfs4_cb_recall { | ||
| 66 | u32 cbr_ident; | ||
| 67 | int cbr_trunc; | ||
| 68 | stateid_t cbr_stateid; | ||
| 69 | struct knfsd_fh cbr_fh; | ||
| 70 | struct nfs4_delegation *cbr_dp; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct nfs4_delegation { | 64 | struct nfs4_delegation { |
| 74 | struct list_head dl_perfile; | 65 | struct list_head dl_perfile; |
| 75 | struct list_head dl_perclnt; | 66 | struct list_head dl_perclnt; |
| @@ -81,14 +72,15 @@ struct nfs4_delegation { | |||
| 81 | struct file *dl_vfs_file; | 72 | struct file *dl_vfs_file; |
| 82 | u32 dl_type; | 73 | u32 dl_type; |
| 83 | time_t dl_time; | 74 | time_t dl_time; |
| 84 | struct nfs4_cb_recall dl_recall; | 75 | /* For recall: */ |
| 76 | u32 dl_ident; | ||
| 77 | stateid_t dl_stateid; | ||
| 78 | struct knfsd_fh dl_fh; | ||
| 79 | int dl_retries; | ||
| 85 | }; | 80 | }; |
| 86 | 81 | ||
| 87 | #define dl_stateid dl_recall.cbr_stateid | ||
| 88 | #define dl_fh dl_recall.cbr_fh | ||
| 89 | |||
| 90 | /* client delegation callback info */ | 82 | /* client delegation callback info */ |
| 91 | struct nfs4_callback { | 83 | struct nfs4_cb_conn { |
| 92 | /* SETCLIENTID info */ | 84 | /* SETCLIENTID info */ |
| 93 | u32 cb_addr; | 85 | u32 cb_addr; |
| 94 | unsigned short cb_port; | 86 | unsigned short cb_port; |
| @@ -97,6 +89,7 @@ struct nfs4_callback { | |||
| 97 | /* RPC client info */ | 89 | /* RPC client info */ |
| 98 | atomic_t cb_set; /* successful CB_NULL call */ | 90 | atomic_t cb_set; /* successful CB_NULL call */ |
| 99 | struct rpc_clnt * cb_client; | 91 | struct rpc_clnt * cb_client; |
| 92 | struct rpc_cred * cb_cred; | ||
| 100 | }; | 93 | }; |
| 101 | 94 | ||
| 102 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ | 95 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ |
| @@ -185,7 +178,7 @@ struct nfs4_client { | |||
| 185 | struct svc_cred cl_cred; /* setclientid principal */ | 178 | struct svc_cred cl_cred; /* setclientid principal */ |
| 186 | clientid_t cl_clientid; /* generated by server */ | 179 | clientid_t cl_clientid; /* generated by server */ |
| 187 | nfs4_verifier cl_confirm; /* generated by server */ | 180 | nfs4_verifier cl_confirm; /* generated by server */ |
| 188 | struct nfs4_callback cl_callback; /* callback info */ | 181 | struct nfs4_cb_conn cl_cb_conn; /* callback info */ |
| 189 | atomic_t cl_count; /* ref count */ | 182 | atomic_t cl_count; /* ref count */ |
| 190 | u32 cl_firststate; /* recovery dir creation */ | 183 | u32 cl_firststate; /* recovery dir creation */ |
| 191 | 184 | ||
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index f80d6013fdc3..d0f050f01eca 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
| @@ -64,10 +64,13 @@ static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs) | |||
| 64 | 64 | ||
| 65 | struct nfsd4_change_info { | 65 | struct nfsd4_change_info { |
| 66 | u32 atomic; | 66 | u32 atomic; |
| 67 | bool change_supported; | ||
| 67 | u32 before_ctime_sec; | 68 | u32 before_ctime_sec; |
| 68 | u32 before_ctime_nsec; | 69 | u32 before_ctime_nsec; |
| 70 | u64 before_change; | ||
| 69 | u32 after_ctime_sec; | 71 | u32 after_ctime_sec; |
| 70 | u32 after_ctime_nsec; | 72 | u32 after_ctime_nsec; |
| 73 | u64 after_change; | ||
| 71 | }; | 74 | }; |
| 72 | 75 | ||
| 73 | struct nfsd4_access { | 76 | struct nfsd4_access { |
| @@ -503,10 +506,16 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp) | |||
| 503 | { | 506 | { |
| 504 | BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved); | 507 | BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved); |
| 505 | cinfo->atomic = 1; | 508 | cinfo->atomic = 1; |
| 506 | cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; | 509 | cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode); |
| 507 | cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; | 510 | if (cinfo->change_supported) { |
| 508 | cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; | 511 | cinfo->before_change = fhp->fh_pre_change; |
| 509 | cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; | 512 | cinfo->after_change = fhp->fh_post_change; |
| 513 | } else { | ||
| 514 | cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; | ||
| 515 | cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; | ||
| 516 | cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; | ||
| 517 | cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; | ||
| 518 | } | ||
| 510 | } | 519 | } |
| 511 | 520 | ||
| 512 | int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); | 521 | int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 0d9cb6ef28b0..2223ae0b5ed5 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -83,7 +83,7 @@ int svc_port_is_privileged(struct sockaddr *sin); | |||
| 83 | int svc_print_xprts(char *buf, int maxlen); | 83 | int svc_print_xprts(char *buf, int maxlen); |
| 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, | 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, |
| 85 | const sa_family_t af, const unsigned short port); | 85 | const sa_family_t af, const unsigned short port); |
| 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); | 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); |
| 87 | 87 | ||
| 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
| 89 | { | 89 | { |
| @@ -118,7 +118,7 @@ static inline unsigned short svc_addr_port(const struct sockaddr *sa) | |||
| 118 | return 0; | 118 | return 0; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | static inline size_t svc_addr_len(struct sockaddr *sa) | 121 | static inline size_t svc_addr_len(const struct sockaddr *sa) |
| 122 | { | 122 | { |
| 123 | switch (sa->sa_family) { | 123 | switch (sa->sa_family) { |
| 124 | case AF_INET: | 124 | case AF_INET: |
| @@ -126,7 +126,8 @@ static inline size_t svc_addr_len(struct sockaddr *sa) | |||
| 126 | case AF_INET6: | 126 | case AF_INET6: |
| 127 | return sizeof(struct sockaddr_in6); | 127 | return sizeof(struct sockaddr_in6); |
| 128 | } | 128 | } |
| 129 | return -EAFNOSUPPORT; | 129 | |
| 130 | return 0; | ||
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) | 133 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 483e10380aae..827163138949 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -38,8 +38,11 @@ int svc_recv(struct svc_rqst *, long); | |||
| 38 | int svc_send(struct svc_rqst *); | 38 | int svc_send(struct svc_rqst *); |
| 39 | void svc_drop(struct svc_rqst *); | 39 | void svc_drop(struct svc_rqst *); |
| 40 | void svc_sock_update_bufs(struct svc_serv *serv); | 40 | void svc_sock_update_bufs(struct svc_serv *serv); |
| 41 | int svc_sock_names(char *buf, struct svc_serv *serv, char *toclose); | 41 | int svc_sock_names(struct svc_serv *serv, char *buf, |
| 42 | int svc_addsock(struct svc_serv *serv, int fd, char *name_return); | 42 | const size_t buflen, |
| 43 | const char *toclose); | ||
| 44 | int svc_addsock(struct svc_serv *serv, const int fd, | ||
| 45 | char *name_return, const size_t len); | ||
| 43 | void svc_init_xprt_sock(void); | 46 | void svc_init_xprt_sock(void); |
| 44 | void svc_cleanup_xprt_sock(void); | 47 | void svc_cleanup_xprt_sock(void); |
| 45 | 48 | ||
