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