blob: 0805778a818537c8bc437f762da6fa6ee2b7f63e [file] [log] [blame]
Mike Marshallf7ab0932015-07-17 10:38:11 -04001/*
2 * (C) 2001 Clemson University and The University of Chicago
3 *
4 * See COPYING in top-level directory.
5 */
6
7#ifndef __UPCALL_H
8#define __UPCALL_H
9
10/*
11 * Sanitized this header file to fix
12 * 32-64 bit interaction issues between
13 * client-core and device
14 */
15struct pvfs2_io_request_s {
16 __s32 async_vfs_io;
17 __s32 buf_index;
18 __s32 count;
19 __s32 __pad1;
20 __s64 offset;
21 struct pvfs2_object_kref refn;
22 enum PVFS_io_type io_type;
23 __s32 readahead_size;
24};
25
Mike Marshallf7ab0932015-07-17 10:38:11 -040026struct pvfs2_lookup_request_s {
27 __s32 sym_follow;
28 __s32 __pad1;
29 struct pvfs2_object_kref parent_refn;
30 char d_name[PVFS2_NAME_LEN];
31};
32
33struct pvfs2_create_request_s {
34 struct pvfs2_object_kref parent_refn;
35 struct PVFS_sys_attr_s attributes;
36 char d_name[PVFS2_NAME_LEN];
37};
38
39struct pvfs2_symlink_request_s {
40 struct pvfs2_object_kref parent_refn;
41 struct PVFS_sys_attr_s attributes;
42 char entry_name[PVFS2_NAME_LEN];
43 char target[PVFS2_NAME_LEN];
44};
45
46struct pvfs2_getattr_request_s {
47 struct pvfs2_object_kref refn;
48 __u32 mask;
49 __u32 __pad1;
50};
51
52struct pvfs2_setattr_request_s {
53 struct pvfs2_object_kref refn;
54 struct PVFS_sys_attr_s attributes;
55};
56
57struct pvfs2_remove_request_s {
58 struct pvfs2_object_kref parent_refn;
59 char d_name[PVFS2_NAME_LEN];
60};
61
62struct pvfs2_mkdir_request_s {
63 struct pvfs2_object_kref parent_refn;
64 struct PVFS_sys_attr_s attributes;
65 char d_name[PVFS2_NAME_LEN];
66};
67
68struct pvfs2_readdir_request_s {
69 struct pvfs2_object_kref refn;
70 __u64 token;
71 __s32 max_dirent_count;
72 __s32 buf_index;
73};
74
75struct pvfs2_readdirplus_request_s {
76 struct pvfs2_object_kref refn;
77 __u64 token;
78 __s32 max_dirent_count;
79 __u32 mask;
80 __s32 buf_index;
81 __s32 __pad1;
82};
83
84struct pvfs2_rename_request_s {
85 struct pvfs2_object_kref old_parent_refn;
86 struct pvfs2_object_kref new_parent_refn;
87 char d_old_name[PVFS2_NAME_LEN];
88 char d_new_name[PVFS2_NAME_LEN];
89};
90
91struct pvfs2_statfs_request_s {
92 __s32 fs_id;
93 __s32 __pad1;
94};
95
96struct pvfs2_truncate_request_s {
97 struct pvfs2_object_kref refn;
98 __s64 size;
99};
100
101struct pvfs2_mmap_ra_cache_flush_request_s {
102 struct pvfs2_object_kref refn;
103};
104
105struct pvfs2_fs_mount_request_s {
106 char pvfs2_config_server[PVFS_MAX_SERVER_ADDR_LEN];
107};
108
109struct pvfs2_fs_umount_request_s {
110 __s32 id;
111 __s32 fs_id;
112 char pvfs2_config_server[PVFS_MAX_SERVER_ADDR_LEN];
113};
114
115struct pvfs2_getxattr_request_s {
116 struct pvfs2_object_kref refn;
117 __s32 key_sz;
118 __s32 __pad1;
119 char key[PVFS_MAX_XATTR_NAMELEN];
120};
121
122struct pvfs2_setxattr_request_s {
123 struct pvfs2_object_kref refn;
124 struct PVFS_keyval_pair keyval;
125 __s32 flags;
126 __s32 __pad1;
127};
128
129struct pvfs2_listxattr_request_s {
130 struct pvfs2_object_kref refn;
131 __s32 requested_count;
132 __s32 __pad1;
133 __u64 token;
134};
135
136struct pvfs2_removexattr_request_s {
137 struct pvfs2_object_kref refn;
138 __s32 key_sz;
139 __s32 __pad1;
140 char key[PVFS_MAX_XATTR_NAMELEN];
141};
142
143struct pvfs2_op_cancel_s {
144 __u64 op_tag;
145};
146
147struct pvfs2_fsync_request_s {
148 struct pvfs2_object_kref refn;
149};
150
151enum pvfs2_param_request_type {
152 PVFS2_PARAM_REQUEST_SET = 1,
153 PVFS2_PARAM_REQUEST_GET = 2
154};
155
156enum pvfs2_param_request_op {
157 PVFS2_PARAM_REQUEST_OP_ACACHE_TIMEOUT_MSECS = 1,
158 PVFS2_PARAM_REQUEST_OP_ACACHE_HARD_LIMIT = 2,
159 PVFS2_PARAM_REQUEST_OP_ACACHE_SOFT_LIMIT = 3,
160 PVFS2_PARAM_REQUEST_OP_ACACHE_RECLAIM_PERCENTAGE = 4,
161 PVFS2_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS = 5,
162 PVFS2_PARAM_REQUEST_OP_PERF_HISTORY_SIZE = 6,
163 PVFS2_PARAM_REQUEST_OP_PERF_RESET = 7,
164 PVFS2_PARAM_REQUEST_OP_NCACHE_TIMEOUT_MSECS = 8,
165 PVFS2_PARAM_REQUEST_OP_NCACHE_HARD_LIMIT = 9,
166 PVFS2_PARAM_REQUEST_OP_NCACHE_SOFT_LIMIT = 10,
167 PVFS2_PARAM_REQUEST_OP_NCACHE_RECLAIM_PERCENTAGE = 11,
168 PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_TIMEOUT_MSECS = 12,
169 PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_HARD_LIMIT = 13,
170 PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_SOFT_LIMIT = 14,
171 PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_RECLAIM_PERCENTAGE = 15,
172 PVFS2_PARAM_REQUEST_OP_CLIENT_DEBUG = 16,
173 PVFS2_PARAM_REQUEST_OP_CCACHE_TIMEOUT_SECS = 17,
174 PVFS2_PARAM_REQUEST_OP_CCACHE_HARD_LIMIT = 18,
175 PVFS2_PARAM_REQUEST_OP_CCACHE_SOFT_LIMIT = 19,
176 PVFS2_PARAM_REQUEST_OP_CCACHE_RECLAIM_PERCENTAGE = 20,
177 PVFS2_PARAM_REQUEST_OP_CAPCACHE_TIMEOUT_SECS = 21,
178 PVFS2_PARAM_REQUEST_OP_CAPCACHE_HARD_LIMIT = 22,
179 PVFS2_PARAM_REQUEST_OP_CAPCACHE_SOFT_LIMIT = 23,
180 PVFS2_PARAM_REQUEST_OP_CAPCACHE_RECLAIM_PERCENTAGE = 24,
181 PVFS2_PARAM_REQUEST_OP_TWO_MASK_VALUES = 25,
182};
183
184struct pvfs2_param_request_s {
185 enum pvfs2_param_request_type type;
186 enum pvfs2_param_request_op op;
187 __s64 value;
188 char s_value[PVFS2_MAX_DEBUG_STRING_LEN];
189};
190
191enum pvfs2_perf_count_request_type {
192 PVFS2_PERF_COUNT_REQUEST_ACACHE = 1,
193 PVFS2_PERF_COUNT_REQUEST_NCACHE = 2,
194 PVFS2_PERF_COUNT_REQUEST_CAPCACHE = 3,
195};
196
197struct pvfs2_perf_count_request_s {
198 enum pvfs2_perf_count_request_type type;
199 __s32 __pad1;
200};
201
202struct pvfs2_fs_key_request_s {
203 __s32 fsid;
204 __s32 __pad1;
205};
206
207struct pvfs2_upcall_s {
208 __s32 type;
209 __u32 uid;
210 __u32 gid;
211 int pid;
212 int tgid;
Martin Brandenburgf0ed4412015-11-13 14:26:09 -0500213 /* Trailers unused but must be retained for protocol compatibility. */
Mike Marshallf7ab0932015-07-17 10:38:11 -0400214 __s64 trailer_size;
215 char *trailer_buf;
216
217 union {
218 struct pvfs2_io_request_s io;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400219 struct pvfs2_lookup_request_s lookup;
220 struct pvfs2_create_request_s create;
221 struct pvfs2_symlink_request_s sym;
222 struct pvfs2_getattr_request_s getattr;
223 struct pvfs2_setattr_request_s setattr;
224 struct pvfs2_remove_request_s remove;
225 struct pvfs2_mkdir_request_s mkdir;
226 struct pvfs2_readdir_request_s readdir;
227 struct pvfs2_readdirplus_request_s readdirplus;
228 struct pvfs2_rename_request_s rename;
229 struct pvfs2_statfs_request_s statfs;
230 struct pvfs2_truncate_request_s truncate;
231 struct pvfs2_mmap_ra_cache_flush_request_s ra_cache_flush;
232 struct pvfs2_fs_mount_request_s fs_mount;
233 struct pvfs2_fs_umount_request_s fs_umount;
234 struct pvfs2_getxattr_request_s getxattr;
235 struct pvfs2_setxattr_request_s setxattr;
236 struct pvfs2_listxattr_request_s listxattr;
237 struct pvfs2_removexattr_request_s removexattr;
238 struct pvfs2_op_cancel_s cancel;
239 struct pvfs2_fsync_request_s fsync;
240 struct pvfs2_param_request_s param;
241 struct pvfs2_perf_count_request_s perf_count;
242 struct pvfs2_fs_key_request_s fs_key;
243 } req;
244};
245
246#endif /* __UPCALL_H */