diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs.h | 5 | ||||
| -rw-r--r-- | include/linux/fsnotify_backend.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/cache.h | 7 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 6 | ||||
| -rw-r--r-- | include/uapi/linux/nfsd/cld.h | 41 |
5 files changed, 53 insertions, 8 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index b0c6b0d34d02..e0d909d35763 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1168,6 +1168,11 @@ extern void lease_get_mtime(struct inode *, struct timespec64 *time); | |||
| 1168 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); | 1168 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); |
| 1169 | extern int vfs_setlease(struct file *, long, struct file_lock **, void **); | 1169 | extern int vfs_setlease(struct file *, long, struct file_lock **, void **); |
| 1170 | extern int lease_modify(struct file_lock *, int, struct list_head *); | 1170 | extern int lease_modify(struct file_lock *, int, struct list_head *); |
| 1171 | |||
| 1172 | struct notifier_block; | ||
| 1173 | extern int lease_register_notifier(struct notifier_block *); | ||
| 1174 | extern void lease_unregister_notifier(struct notifier_block *); | ||
| 1175 | |||
| 1171 | struct files_struct; | 1176 | struct files_struct; |
| 1172 | extern void show_fd_locks(struct seq_file *f, | 1177 | extern void show_fd_locks(struct seq_file *f, |
| 1173 | struct file *filp, struct files_struct *files); | 1178 | struct file *filp, struct files_struct *files); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 2de3b2ddd19a..1915bdba2fad 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -475,6 +475,8 @@ extern void fsnotify_destroy_mark(struct fsnotify_mark *mark, | |||
| 475 | extern void fsnotify_detach_mark(struct fsnotify_mark *mark); | 475 | extern void fsnotify_detach_mark(struct fsnotify_mark *mark); |
| 476 | /* free mark */ | 476 | /* free mark */ |
| 477 | extern void fsnotify_free_mark(struct fsnotify_mark *mark); | 477 | extern void fsnotify_free_mark(struct fsnotify_mark *mark); |
| 478 | /* Wait until all marks queued for destruction are destroyed */ | ||
| 479 | extern void fsnotify_wait_marks_destroyed(void); | ||
| 478 | /* run all the marks in a group, and clear all of the marks attached to given object type */ | 480 | /* run all the marks in a group, and clear all of the marks attached to given object type */ |
| 479 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group, unsigned int type); | 481 | extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group, unsigned int type); |
| 480 | /* run all the marks in a group, and clear all of the vfsmount marks */ | 482 | /* run all the marks in a group, and clear all of the vfsmount marks */ |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index c7f38e897174..f8603724fbee 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -87,6 +87,7 @@ struct cache_detail { | |||
| 87 | int has_died); | 87 | int has_died); |
| 88 | 88 | ||
| 89 | struct cache_head * (*alloc)(void); | 89 | struct cache_head * (*alloc)(void); |
| 90 | void (*flush)(void); | ||
| 90 | int (*match)(struct cache_head *orig, struct cache_head *new); | 91 | int (*match)(struct cache_head *orig, struct cache_head *new); |
| 91 | void (*init)(struct cache_head *orig, struct cache_head *new); | 92 | void (*init)(struct cache_head *orig, struct cache_head *new); |
| 92 | void (*update)(struct cache_head *orig, struct cache_head *new); | 93 | void (*update)(struct cache_head *orig, struct cache_head *new); |
| @@ -107,9 +108,9 @@ struct cache_detail { | |||
| 107 | /* fields for communication over channel */ | 108 | /* fields for communication over channel */ |
| 108 | struct list_head queue; | 109 | struct list_head queue; |
| 109 | 110 | ||
| 110 | atomic_t readers; /* how many time is /chennel open */ | 111 | atomic_t writers; /* how many time is /channel open */ |
| 111 | time_t last_close; /* if no readers, when did last close */ | 112 | time_t last_close; /* if no writers, when did last close */ |
| 112 | time_t last_warn; /* when we last warned about no readers */ | 113 | time_t last_warn; /* when we last warned about no writers */ |
| 113 | 114 | ||
| 114 | union { | 115 | union { |
| 115 | struct proc_dir_entry *procfs; | 116 | struct proc_dir_entry *procfs; |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 981f0d726ad4..40f65888dd38 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | 42 | ||
| 43 | #ifndef SVC_RDMA_H | 43 | #ifndef SVC_RDMA_H |
| 44 | #define SVC_RDMA_H | 44 | #define SVC_RDMA_H |
| 45 | #include <linux/llist.h> | ||
| 45 | #include <linux/sunrpc/xdr.h> | 46 | #include <linux/sunrpc/xdr.h> |
| 46 | #include <linux/sunrpc/svcsock.h> | 47 | #include <linux/sunrpc/svcsock.h> |
| 47 | #include <linux/sunrpc/rpc_rdma.h> | 48 | #include <linux/sunrpc/rpc_rdma.h> |
| @@ -107,8 +108,7 @@ struct svcxprt_rdma { | |||
| 107 | struct list_head sc_read_complete_q; | 108 | struct list_head sc_read_complete_q; |
| 108 | struct work_struct sc_work; | 109 | struct work_struct sc_work; |
| 109 | 110 | ||
| 110 | spinlock_t sc_recv_lock; | 111 | struct llist_head sc_recv_ctxts; |
| 111 | struct list_head sc_recv_ctxts; | ||
| 112 | }; | 112 | }; |
| 113 | /* sc_flags */ | 113 | /* sc_flags */ |
| 114 | #define RDMAXPRT_CONN_PENDING 3 | 114 | #define RDMAXPRT_CONN_PENDING 3 |
| @@ -125,6 +125,7 @@ enum { | |||
| 125 | #define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD | 125 | #define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD |
| 126 | 126 | ||
| 127 | struct svc_rdma_recv_ctxt { | 127 | struct svc_rdma_recv_ctxt { |
| 128 | struct llist_node rc_node; | ||
| 128 | struct list_head rc_list; | 129 | struct list_head rc_list; |
| 129 | struct ib_recv_wr rc_recv_wr; | 130 | struct ib_recv_wr rc_recv_wr; |
| 130 | struct ib_cqe rc_cqe; | 131 | struct ib_cqe rc_cqe; |
| @@ -200,7 +201,6 @@ extern struct svc_xprt_class svc_rdma_bc_class; | |||
| 200 | #endif | 201 | #endif |
| 201 | 202 | ||
| 202 | /* svc_rdma.c */ | 203 | /* svc_rdma.c */ |
| 203 | extern struct workqueue_struct *svc_rdma_wq; | ||
| 204 | extern int svc_rdma_init(void); | 204 | extern int svc_rdma_init(void); |
| 205 | extern void svc_rdma_cleanup(void); | 205 | extern void svc_rdma_cleanup(void); |
| 206 | 206 | ||
diff --git a/include/uapi/linux/nfsd/cld.h b/include/uapi/linux/nfsd/cld.h index b1e9de4f07d5..a519313af953 100644 --- a/include/uapi/linux/nfsd/cld.h +++ b/include/uapi/linux/nfsd/cld.h | |||
| @@ -26,17 +26,22 @@ | |||
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | 27 | ||
| 28 | /* latest upcall version available */ | 28 | /* latest upcall version available */ |
| 29 | #define CLD_UPCALL_VERSION 1 | 29 | #define CLD_UPCALL_VERSION 2 |
| 30 | 30 | ||
| 31 | /* defined by RFC3530 */ | 31 | /* defined by RFC3530 */ |
| 32 | #define NFS4_OPAQUE_LIMIT 1024 | 32 | #define NFS4_OPAQUE_LIMIT 1024 |
| 33 | 33 | ||
| 34 | #ifndef SHA256_DIGEST_SIZE | ||
| 35 | #define SHA256_DIGEST_SIZE 32 | ||
| 36 | #endif | ||
| 37 | |||
| 34 | enum cld_command { | 38 | enum cld_command { |
| 35 | Cld_Create, /* create a record for this cm_id */ | 39 | Cld_Create, /* create a record for this cm_id */ |
| 36 | Cld_Remove, /* remove record of this cm_id */ | 40 | Cld_Remove, /* remove record of this cm_id */ |
| 37 | Cld_Check, /* is this cm_id allowed? */ | 41 | Cld_Check, /* is this cm_id allowed? */ |
| 38 | Cld_GraceDone, /* grace period is complete */ | 42 | Cld_GraceDone, /* grace period is complete */ |
| 39 | Cld_GraceStart, | 43 | Cld_GraceStart, /* grace start (upload client records) */ |
| 44 | Cld_GetVersion, /* query max supported upcall version */ | ||
| 40 | }; | 45 | }; |
| 41 | 46 | ||
| 42 | /* representation of long-form NFSv4 client ID */ | 47 | /* representation of long-form NFSv4 client ID */ |
| @@ -45,6 +50,17 @@ struct cld_name { | |||
| 45 | unsigned char cn_id[NFS4_OPAQUE_LIMIT]; /* client-provided */ | 50 | unsigned char cn_id[NFS4_OPAQUE_LIMIT]; /* client-provided */ |
| 46 | } __attribute__((packed)); | 51 | } __attribute__((packed)); |
| 47 | 52 | ||
| 53 | /* sha256 hash of the kerberos principal */ | ||
| 54 | struct cld_princhash { | ||
| 55 | __u8 cp_len; /* length of cp_data */ | ||
| 56 | unsigned char cp_data[SHA256_DIGEST_SIZE]; /* hash of principal */ | ||
| 57 | } __attribute__((packed)); | ||
| 58 | |||
| 59 | struct cld_clntinfo { | ||
| 60 | struct cld_name cc_name; | ||
| 61 | struct cld_princhash cc_princhash; | ||
| 62 | } __attribute__((packed)); | ||
| 63 | |||
| 48 | /* message struct for communication with userspace */ | 64 | /* message struct for communication with userspace */ |
| 49 | struct cld_msg { | 65 | struct cld_msg { |
| 50 | __u8 cm_vers; /* upcall version */ | 66 | __u8 cm_vers; /* upcall version */ |
| @@ -54,7 +70,28 @@ struct cld_msg { | |||
| 54 | union { | 70 | union { |
| 55 | __s64 cm_gracetime; /* grace period start time */ | 71 | __s64 cm_gracetime; /* grace period start time */ |
| 56 | struct cld_name cm_name; | 72 | struct cld_name cm_name; |
| 73 | __u8 cm_version; /* for getting max version */ | ||
| 74 | } __attribute__((packed)) cm_u; | ||
| 75 | } __attribute__((packed)); | ||
| 76 | |||
| 77 | /* version 2 message can include hash of kerberos principal */ | ||
| 78 | struct cld_msg_v2 { | ||
| 79 | __u8 cm_vers; /* upcall version */ | ||
| 80 | __u8 cm_cmd; /* upcall command */ | ||
| 81 | __s16 cm_status; /* return code */ | ||
| 82 | __u32 cm_xid; /* transaction id */ | ||
| 83 | union { | ||
| 84 | struct cld_name cm_name; | ||
| 85 | __u8 cm_version; /* for getting max version */ | ||
| 86 | struct cld_clntinfo cm_clntinfo; /* name & princ hash */ | ||
| 57 | } __attribute__((packed)) cm_u; | 87 | } __attribute__((packed)) cm_u; |
| 58 | } __attribute__((packed)); | 88 | } __attribute__((packed)); |
| 59 | 89 | ||
| 90 | struct cld_msg_hdr { | ||
| 91 | __u8 cm_vers; /* upcall version */ | ||
| 92 | __u8 cm_cmd; /* upcall command */ | ||
| 93 | __s16 cm_status; /* return code */ | ||
| 94 | __u32 cm_xid; /* transaction id */ | ||
| 95 | } __attribute__((packed)); | ||
| 96 | |||
| 60 | #endif /* !_NFSD_CLD_H */ | 97 | #endif /* !_NFSD_CLD_H */ |
