blob: b8249f8fdd8027b8552e4b019203b4ea2dd6ea2a [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 */
Yi Liu8bb8aef2015-11-24 15:12:14 -050015struct orangefs_io_request_s {
Martin Brandenburg9c2bcf22016-02-20 14:26:01 -050016 __s32 __pad1;
Mike Marshallf7ab0932015-07-17 10:38:11 -040017 __s32 buf_index;
18 __s32 count;
Martin Brandenburg9c2bcf22016-02-20 14:26:01 -050019 __s32 __pad2;
Mike Marshallf7ab0932015-07-17 10:38:11 -040020 __s64 offset;
Yi Liu8bb8aef2015-11-24 15:12:14 -050021 struct orangefs_object_kref refn;
22 enum ORANGEFS_io_type io_type;
Mike Marshallf7ab0932015-07-17 10:38:11 -040023 __s32 readahead_size;
24};
25
Yi Liu8bb8aef2015-11-24 15:12:14 -050026struct orangefs_lookup_request_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -040027 __s32 sym_follow;
28 __s32 __pad1;
Yi Liu8bb8aef2015-11-24 15:12:14 -050029 struct orangefs_object_kref parent_refn;
Martin Brandenburg47b49482016-02-20 14:22:40 -050030 char d_name[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040031};
32
Yi Liu8bb8aef2015-11-24 15:12:14 -050033struct orangefs_create_request_s {
34 struct orangefs_object_kref parent_refn;
35 struct ORANGEFS_sys_attr_s attributes;
Martin Brandenburg47b49482016-02-20 14:22:40 -050036 char d_name[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040037};
38
Yi Liu8bb8aef2015-11-24 15:12:14 -050039struct orangefs_symlink_request_s {
40 struct orangefs_object_kref parent_refn;
41 struct ORANGEFS_sys_attr_s attributes;
Martin Brandenburg47b49482016-02-20 14:22:40 -050042 char entry_name[ORANGEFS_NAME_MAX];
43 char target[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040044};
45
Yi Liu8bb8aef2015-11-24 15:12:14 -050046struct orangefs_getattr_request_s {
47 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -040048 __u32 mask;
49 __u32 __pad1;
50};
51
Yi Liu8bb8aef2015-11-24 15:12:14 -050052struct orangefs_setattr_request_s {
53 struct orangefs_object_kref refn;
54 struct ORANGEFS_sys_attr_s attributes;
Mike Marshallf7ab0932015-07-17 10:38:11 -040055};
56
Yi Liu8bb8aef2015-11-24 15:12:14 -050057struct orangefs_remove_request_s {
58 struct orangefs_object_kref parent_refn;
Martin Brandenburg47b49482016-02-20 14:22:40 -050059 char d_name[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040060};
61
Yi Liu8bb8aef2015-11-24 15:12:14 -050062struct orangefs_mkdir_request_s {
63 struct orangefs_object_kref parent_refn;
64 struct ORANGEFS_sys_attr_s attributes;
Martin Brandenburg47b49482016-02-20 14:22:40 -050065 char d_name[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040066};
67
Yi Liu8bb8aef2015-11-24 15:12:14 -050068struct orangefs_readdir_request_s {
69 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -040070 __u64 token;
71 __s32 max_dirent_count;
72 __s32 buf_index;
73};
74
Yi Liu8bb8aef2015-11-24 15:12:14 -050075struct orangefs_readdirplus_request_s {
76 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -040077 __u64 token;
78 __s32 max_dirent_count;
79 __u32 mask;
80 __s32 buf_index;
81 __s32 __pad1;
82};
83
Yi Liu8bb8aef2015-11-24 15:12:14 -050084struct orangefs_rename_request_s {
85 struct orangefs_object_kref old_parent_refn;
86 struct orangefs_object_kref new_parent_refn;
Martin Brandenburg47b49482016-02-20 14:22:40 -050087 char d_old_name[ORANGEFS_NAME_MAX];
88 char d_new_name[ORANGEFS_NAME_MAX];
Mike Marshallf7ab0932015-07-17 10:38:11 -040089};
90
Yi Liu8bb8aef2015-11-24 15:12:14 -050091struct orangefs_statfs_request_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -040092 __s32 fs_id;
93 __s32 __pad1;
94};
95
Yi Liu8bb8aef2015-11-24 15:12:14 -050096struct orangefs_truncate_request_s {
97 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -040098 __s64 size;
99};
100
Martin Brandenburg6eaff8c2016-08-02 14:31:05 -0400101struct orangefs_ra_cache_flush_request_s {
Yi Liu8bb8aef2015-11-24 15:12:14 -0500102 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400103};
104
Yi Liu8bb8aef2015-11-24 15:12:14 -0500105struct orangefs_fs_mount_request_s {
106 char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN];
Mike Marshallf7ab0932015-07-17 10:38:11 -0400107};
108
Yi Liu8bb8aef2015-11-24 15:12:14 -0500109struct orangefs_fs_umount_request_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -0400110 __s32 id;
111 __s32 fs_id;
Yi Liu8bb8aef2015-11-24 15:12:14 -0500112 char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN];
Mike Marshallf7ab0932015-07-17 10:38:11 -0400113};
114
Yi Liu8bb8aef2015-11-24 15:12:14 -0500115struct orangefs_getxattr_request_s {
116 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400117 __s32 key_sz;
118 __s32 __pad1;
Yi Liu8bb8aef2015-11-24 15:12:14 -0500119 char key[ORANGEFS_MAX_XATTR_NAMELEN];
Mike Marshallf7ab0932015-07-17 10:38:11 -0400120};
121
Yi Liu8bb8aef2015-11-24 15:12:14 -0500122struct orangefs_setxattr_request_s {
123 struct orangefs_object_kref refn;
124 struct ORANGEFS_keyval_pair keyval;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400125 __s32 flags;
126 __s32 __pad1;
127};
128
Yi Liu8bb8aef2015-11-24 15:12:14 -0500129struct orangefs_listxattr_request_s {
130 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400131 __s32 requested_count;
132 __s32 __pad1;
133 __u64 token;
134};
135
Yi Liu8bb8aef2015-11-24 15:12:14 -0500136struct orangefs_removexattr_request_s {
137 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400138 __s32 key_sz;
139 __s32 __pad1;
Yi Liu8bb8aef2015-11-24 15:12:14 -0500140 char key[ORANGEFS_MAX_XATTR_NAMELEN];
Mike Marshallf7ab0932015-07-17 10:38:11 -0400141};
142
Yi Liu8bb8aef2015-11-24 15:12:14 -0500143struct orangefs_op_cancel_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -0400144 __u64 op_tag;
145};
146
Yi Liu8bb8aef2015-11-24 15:12:14 -0500147struct orangefs_fsync_request_s {
148 struct orangefs_object_kref refn;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400149};
150
Yi Liu8bb8aef2015-11-24 15:12:14 -0500151enum orangefs_param_request_type {
152 ORANGEFS_PARAM_REQUEST_SET = 1,
153 ORANGEFS_PARAM_REQUEST_GET = 2
Mike Marshallf7ab0932015-07-17 10:38:11 -0400154};
155
Yi Liu8bb8aef2015-11-24 15:12:14 -0500156enum orangefs_param_request_op {
157 ORANGEFS_PARAM_REQUEST_OP_ACACHE_TIMEOUT_MSECS = 1,
158 ORANGEFS_PARAM_REQUEST_OP_ACACHE_HARD_LIMIT = 2,
159 ORANGEFS_PARAM_REQUEST_OP_ACACHE_SOFT_LIMIT = 3,
160 ORANGEFS_PARAM_REQUEST_OP_ACACHE_RECLAIM_PERCENTAGE = 4,
161 ORANGEFS_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS = 5,
162 ORANGEFS_PARAM_REQUEST_OP_PERF_HISTORY_SIZE = 6,
163 ORANGEFS_PARAM_REQUEST_OP_PERF_RESET = 7,
164 ORANGEFS_PARAM_REQUEST_OP_NCACHE_TIMEOUT_MSECS = 8,
165 ORANGEFS_PARAM_REQUEST_OP_NCACHE_HARD_LIMIT = 9,
166 ORANGEFS_PARAM_REQUEST_OP_NCACHE_SOFT_LIMIT = 10,
167 ORANGEFS_PARAM_REQUEST_OP_NCACHE_RECLAIM_PERCENTAGE = 11,
168 ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_TIMEOUT_MSECS = 12,
169 ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_HARD_LIMIT = 13,
170 ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_SOFT_LIMIT = 14,
171 ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_RECLAIM_PERCENTAGE = 15,
172 ORANGEFS_PARAM_REQUEST_OP_CLIENT_DEBUG = 16,
173 ORANGEFS_PARAM_REQUEST_OP_CCACHE_TIMEOUT_SECS = 17,
174 ORANGEFS_PARAM_REQUEST_OP_CCACHE_HARD_LIMIT = 18,
175 ORANGEFS_PARAM_REQUEST_OP_CCACHE_SOFT_LIMIT = 19,
176 ORANGEFS_PARAM_REQUEST_OP_CCACHE_RECLAIM_PERCENTAGE = 20,
177 ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_TIMEOUT_SECS = 21,
178 ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_HARD_LIMIT = 22,
179 ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_SOFT_LIMIT = 23,
180 ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_RECLAIM_PERCENTAGE = 24,
181 ORANGEFS_PARAM_REQUEST_OP_TWO_MASK_VALUES = 25,
Martin Brandenburga6dff802016-08-02 16:33:00 -0400182 ORANGEFS_PARAM_REQUEST_OP_READAHEAD_SIZE = 26,
183 ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT = 27,
184 ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT_SIZE = 28,
Martin Brandenburg31c829f2017-01-26 10:25:30 -0500185 ORANGEFS_PARAM_REQUEST_OP_READAHEAD_READCNT = 29,
Mike Marshallf7ab0932015-07-17 10:38:11 -0400186};
187
Yi Liu8bb8aef2015-11-24 15:12:14 -0500188struct orangefs_param_request_s {
189 enum orangefs_param_request_type type;
190 enum orangefs_param_request_op op;
Martin Brandenburg680908e2016-08-02 16:33:34 -0400191 union {
192 __s64 value64;
193 __s32 value32[2];
194 } u;
Yi Liu8bb8aef2015-11-24 15:12:14 -0500195 char s_value[ORANGEFS_MAX_DEBUG_STRING_LEN];
Mike Marshallf7ab0932015-07-17 10:38:11 -0400196};
197
Yi Liu8bb8aef2015-11-24 15:12:14 -0500198enum orangefs_perf_count_request_type {
199 ORANGEFS_PERF_COUNT_REQUEST_ACACHE = 1,
200 ORANGEFS_PERF_COUNT_REQUEST_NCACHE = 2,
201 ORANGEFS_PERF_COUNT_REQUEST_CAPCACHE = 3,
Mike Marshallf7ab0932015-07-17 10:38:11 -0400202};
203
Yi Liu8bb8aef2015-11-24 15:12:14 -0500204struct orangefs_perf_count_request_s {
205 enum orangefs_perf_count_request_type type;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400206 __s32 __pad1;
207};
208
Yi Liu8bb8aef2015-11-24 15:12:14 -0500209struct orangefs_fs_key_request_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -0400210 __s32 fsid;
211 __s32 __pad1;
212};
213
Martin Brandenburg482664d2016-08-12 12:02:31 -0400214/* 2.9.6 */
215struct orangefs_features_request_s {
216 __u64 features;
217};
218
Yi Liu8bb8aef2015-11-24 15:12:14 -0500219struct orangefs_upcall_s {
Mike Marshallf7ab0932015-07-17 10:38:11 -0400220 __s32 type;
221 __u32 uid;
222 __u32 gid;
223 int pid;
224 int tgid;
Martin Brandenburgf0ed4412015-11-13 14:26:09 -0500225 /* Trailers unused but must be retained for protocol compatibility. */
Mike Marshallf7ab0932015-07-17 10:38:11 -0400226 __s64 trailer_size;
227 char *trailer_buf;
228
229 union {
Yi Liu8bb8aef2015-11-24 15:12:14 -0500230 struct orangefs_io_request_s io;
231 struct orangefs_lookup_request_s lookup;
232 struct orangefs_create_request_s create;
233 struct orangefs_symlink_request_s sym;
234 struct orangefs_getattr_request_s getattr;
235 struct orangefs_setattr_request_s setattr;
236 struct orangefs_remove_request_s remove;
237 struct orangefs_mkdir_request_s mkdir;
238 struct orangefs_readdir_request_s readdir;
239 struct orangefs_readdirplus_request_s readdirplus;
240 struct orangefs_rename_request_s rename;
241 struct orangefs_statfs_request_s statfs;
242 struct orangefs_truncate_request_s truncate;
Martin Brandenburg6eaff8c2016-08-02 14:31:05 -0400243 struct orangefs_ra_cache_flush_request_s ra_cache_flush;
Yi Liu8bb8aef2015-11-24 15:12:14 -0500244 struct orangefs_fs_mount_request_s fs_mount;
245 struct orangefs_fs_umount_request_s fs_umount;
246 struct orangefs_getxattr_request_s getxattr;
247 struct orangefs_setxattr_request_s setxattr;
248 struct orangefs_listxattr_request_s listxattr;
249 struct orangefs_removexattr_request_s removexattr;
250 struct orangefs_op_cancel_s cancel;
251 struct orangefs_fsync_request_s fsync;
252 struct orangefs_param_request_s param;
253 struct orangefs_perf_count_request_s perf_count;
254 struct orangefs_fs_key_request_s fs_key;
Martin Brandenburg482664d2016-08-12 12:02:31 -0400255 struct orangefs_features_request_s features;
Mike Marshallf7ab0932015-07-17 10:38:11 -0400256 } req;
257};
258
259#endif /* __UPCALL_H */