Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 2 | /* |
| 3 | * (C) 2001 Clemson University and The University of Chicago |
| 4 | * |
| 5 | * See COPYING in top-level directory. |
| 6 | */ |
| 7 | |
| 8 | #ifndef __UPCALL_H |
| 9 | #define __UPCALL_H |
| 10 | |
| 11 | /* |
| 12 | * Sanitized this header file to fix |
| 13 | * 32-64 bit interaction issues between |
| 14 | * client-core and device |
| 15 | */ |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 16 | struct orangefs_io_request_s { |
Martin Brandenburg | 9c2bcf2 | 2016-02-20 14:26:01 -0500 | [diff] [blame] | 17 | __s32 __pad1; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 18 | __s32 buf_index; |
| 19 | __s32 count; |
Martin Brandenburg | 9c2bcf2 | 2016-02-20 14:26:01 -0500 | [diff] [blame] | 20 | __s32 __pad2; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 21 | __s64 offset; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 22 | struct orangefs_object_kref refn; |
| 23 | enum ORANGEFS_io_type io_type; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 24 | __s32 readahead_size; |
| 25 | }; |
| 26 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 27 | struct orangefs_lookup_request_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 28 | __s32 sym_follow; |
| 29 | __s32 __pad1; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 30 | struct orangefs_object_kref parent_refn; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 31 | char d_name[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 32 | }; |
| 33 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 34 | struct orangefs_create_request_s { |
| 35 | struct orangefs_object_kref parent_refn; |
| 36 | struct ORANGEFS_sys_attr_s attributes; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 37 | char d_name[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 38 | }; |
| 39 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 40 | struct orangefs_symlink_request_s { |
| 41 | struct orangefs_object_kref parent_refn; |
| 42 | struct ORANGEFS_sys_attr_s attributes; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 43 | char entry_name[ORANGEFS_NAME_MAX]; |
| 44 | char target[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 45 | }; |
| 46 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 47 | struct orangefs_getattr_request_s { |
| 48 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 49 | __u32 mask; |
| 50 | __u32 __pad1; |
| 51 | }; |
| 52 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 53 | struct orangefs_setattr_request_s { |
| 54 | struct orangefs_object_kref refn; |
| 55 | struct ORANGEFS_sys_attr_s attributes; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 56 | }; |
| 57 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 58 | struct orangefs_remove_request_s { |
| 59 | struct orangefs_object_kref parent_refn; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 60 | char d_name[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 61 | }; |
| 62 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 63 | struct orangefs_mkdir_request_s { |
| 64 | struct orangefs_object_kref parent_refn; |
| 65 | struct ORANGEFS_sys_attr_s attributes; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 66 | char d_name[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 67 | }; |
| 68 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 69 | struct orangefs_readdir_request_s { |
| 70 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 71 | __u64 token; |
| 72 | __s32 max_dirent_count; |
| 73 | __s32 buf_index; |
| 74 | }; |
| 75 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 76 | struct orangefs_readdirplus_request_s { |
| 77 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 78 | __u64 token; |
| 79 | __s32 max_dirent_count; |
| 80 | __u32 mask; |
| 81 | __s32 buf_index; |
| 82 | __s32 __pad1; |
| 83 | }; |
| 84 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 85 | struct orangefs_rename_request_s { |
| 86 | struct orangefs_object_kref old_parent_refn; |
| 87 | struct orangefs_object_kref new_parent_refn; |
Martin Brandenburg | 47b4948 | 2016-02-20 14:22:40 -0500 | [diff] [blame] | 88 | char d_old_name[ORANGEFS_NAME_MAX]; |
| 89 | char d_new_name[ORANGEFS_NAME_MAX]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 90 | }; |
| 91 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 92 | struct orangefs_statfs_request_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 93 | __s32 fs_id; |
| 94 | __s32 __pad1; |
| 95 | }; |
| 96 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 97 | struct orangefs_truncate_request_s { |
| 98 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 99 | __s64 size; |
| 100 | }; |
| 101 | |
Martin Brandenburg | 6eaff8c | 2016-08-02 14:31:05 -0400 | [diff] [blame] | 102 | struct orangefs_ra_cache_flush_request_s { |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 103 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 104 | }; |
| 105 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 106 | struct orangefs_fs_mount_request_s { |
| 107 | char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 108 | }; |
| 109 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 110 | struct orangefs_fs_umount_request_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 111 | __s32 id; |
| 112 | __s32 fs_id; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 113 | char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 114 | }; |
| 115 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 116 | struct orangefs_getxattr_request_s { |
| 117 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 118 | __s32 key_sz; |
| 119 | __s32 __pad1; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 120 | char key[ORANGEFS_MAX_XATTR_NAMELEN]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 121 | }; |
| 122 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 123 | struct orangefs_setxattr_request_s { |
| 124 | struct orangefs_object_kref refn; |
| 125 | struct ORANGEFS_keyval_pair keyval; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 126 | __s32 flags; |
| 127 | __s32 __pad1; |
| 128 | }; |
| 129 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 130 | struct orangefs_listxattr_request_s { |
| 131 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 132 | __s32 requested_count; |
| 133 | __s32 __pad1; |
| 134 | __u64 token; |
| 135 | }; |
| 136 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 137 | struct orangefs_removexattr_request_s { |
| 138 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 139 | __s32 key_sz; |
| 140 | __s32 __pad1; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 141 | char key[ORANGEFS_MAX_XATTR_NAMELEN]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 142 | }; |
| 143 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 144 | struct orangefs_op_cancel_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 145 | __u64 op_tag; |
| 146 | }; |
| 147 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 148 | struct orangefs_fsync_request_s { |
| 149 | struct orangefs_object_kref refn; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 150 | }; |
| 151 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 152 | enum orangefs_param_request_type { |
| 153 | ORANGEFS_PARAM_REQUEST_SET = 1, |
| 154 | ORANGEFS_PARAM_REQUEST_GET = 2 |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 155 | }; |
| 156 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 157 | enum orangefs_param_request_op { |
| 158 | ORANGEFS_PARAM_REQUEST_OP_ACACHE_TIMEOUT_MSECS = 1, |
| 159 | ORANGEFS_PARAM_REQUEST_OP_ACACHE_HARD_LIMIT = 2, |
| 160 | ORANGEFS_PARAM_REQUEST_OP_ACACHE_SOFT_LIMIT = 3, |
| 161 | ORANGEFS_PARAM_REQUEST_OP_ACACHE_RECLAIM_PERCENTAGE = 4, |
| 162 | ORANGEFS_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS = 5, |
| 163 | ORANGEFS_PARAM_REQUEST_OP_PERF_HISTORY_SIZE = 6, |
| 164 | ORANGEFS_PARAM_REQUEST_OP_PERF_RESET = 7, |
| 165 | ORANGEFS_PARAM_REQUEST_OP_NCACHE_TIMEOUT_MSECS = 8, |
| 166 | ORANGEFS_PARAM_REQUEST_OP_NCACHE_HARD_LIMIT = 9, |
| 167 | ORANGEFS_PARAM_REQUEST_OP_NCACHE_SOFT_LIMIT = 10, |
| 168 | ORANGEFS_PARAM_REQUEST_OP_NCACHE_RECLAIM_PERCENTAGE = 11, |
| 169 | ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_TIMEOUT_MSECS = 12, |
| 170 | ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_HARD_LIMIT = 13, |
| 171 | ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_SOFT_LIMIT = 14, |
| 172 | ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_RECLAIM_PERCENTAGE = 15, |
| 173 | ORANGEFS_PARAM_REQUEST_OP_CLIENT_DEBUG = 16, |
| 174 | ORANGEFS_PARAM_REQUEST_OP_CCACHE_TIMEOUT_SECS = 17, |
| 175 | ORANGEFS_PARAM_REQUEST_OP_CCACHE_HARD_LIMIT = 18, |
| 176 | ORANGEFS_PARAM_REQUEST_OP_CCACHE_SOFT_LIMIT = 19, |
| 177 | ORANGEFS_PARAM_REQUEST_OP_CCACHE_RECLAIM_PERCENTAGE = 20, |
| 178 | ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_TIMEOUT_SECS = 21, |
| 179 | ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_HARD_LIMIT = 22, |
| 180 | ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_SOFT_LIMIT = 23, |
| 181 | ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_RECLAIM_PERCENTAGE = 24, |
| 182 | ORANGEFS_PARAM_REQUEST_OP_TWO_MASK_VALUES = 25, |
Martin Brandenburg | a6dff80 | 2016-08-02 16:33:00 -0400 | [diff] [blame] | 183 | ORANGEFS_PARAM_REQUEST_OP_READAHEAD_SIZE = 26, |
| 184 | ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT = 27, |
| 185 | ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT_SIZE = 28, |
Martin Brandenburg | 31c829f | 2017-01-26 10:25:30 -0500 | [diff] [blame] | 186 | ORANGEFS_PARAM_REQUEST_OP_READAHEAD_READCNT = 29, |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 187 | }; |
| 188 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 189 | struct orangefs_param_request_s { |
| 190 | enum orangefs_param_request_type type; |
| 191 | enum orangefs_param_request_op op; |
Martin Brandenburg | 680908e | 2016-08-02 16:33:34 -0400 | [diff] [blame] | 192 | union { |
| 193 | __s64 value64; |
| 194 | __s32 value32[2]; |
| 195 | } u; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 196 | char s_value[ORANGEFS_MAX_DEBUG_STRING_LEN]; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 197 | }; |
| 198 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 199 | enum orangefs_perf_count_request_type { |
| 200 | ORANGEFS_PERF_COUNT_REQUEST_ACACHE = 1, |
| 201 | ORANGEFS_PERF_COUNT_REQUEST_NCACHE = 2, |
| 202 | ORANGEFS_PERF_COUNT_REQUEST_CAPCACHE = 3, |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 203 | }; |
| 204 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 205 | struct orangefs_perf_count_request_s { |
| 206 | enum orangefs_perf_count_request_type type; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 207 | __s32 __pad1; |
| 208 | }; |
| 209 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 210 | struct orangefs_fs_key_request_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 211 | __s32 fsid; |
| 212 | __s32 __pad1; |
| 213 | }; |
| 214 | |
Martin Brandenburg | 482664d | 2016-08-12 12:02:31 -0400 | [diff] [blame] | 215 | /* 2.9.6 */ |
| 216 | struct orangefs_features_request_s { |
| 217 | __u64 features; |
| 218 | }; |
| 219 | |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 220 | struct orangefs_upcall_s { |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 221 | __s32 type; |
| 222 | __u32 uid; |
| 223 | __u32 gid; |
| 224 | int pid; |
| 225 | int tgid; |
Martin Brandenburg | f0ed441 | 2015-11-13 14:26:09 -0500 | [diff] [blame] | 226 | /* Trailers unused but must be retained for protocol compatibility. */ |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 227 | __s64 trailer_size; |
| 228 | char *trailer_buf; |
| 229 | |
| 230 | union { |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 231 | struct orangefs_io_request_s io; |
| 232 | struct orangefs_lookup_request_s lookup; |
| 233 | struct orangefs_create_request_s create; |
| 234 | struct orangefs_symlink_request_s sym; |
| 235 | struct orangefs_getattr_request_s getattr; |
| 236 | struct orangefs_setattr_request_s setattr; |
| 237 | struct orangefs_remove_request_s remove; |
| 238 | struct orangefs_mkdir_request_s mkdir; |
| 239 | struct orangefs_readdir_request_s readdir; |
| 240 | struct orangefs_readdirplus_request_s readdirplus; |
| 241 | struct orangefs_rename_request_s rename; |
| 242 | struct orangefs_statfs_request_s statfs; |
| 243 | struct orangefs_truncate_request_s truncate; |
Martin Brandenburg | 6eaff8c | 2016-08-02 14:31:05 -0400 | [diff] [blame] | 244 | struct orangefs_ra_cache_flush_request_s ra_cache_flush; |
Yi Liu | 8bb8aef | 2015-11-24 15:12:14 -0500 | [diff] [blame] | 245 | struct orangefs_fs_mount_request_s fs_mount; |
| 246 | struct orangefs_fs_umount_request_s fs_umount; |
| 247 | struct orangefs_getxattr_request_s getxattr; |
| 248 | struct orangefs_setxattr_request_s setxattr; |
| 249 | struct orangefs_listxattr_request_s listxattr; |
| 250 | struct orangefs_removexattr_request_s removexattr; |
| 251 | struct orangefs_op_cancel_s cancel; |
| 252 | struct orangefs_fsync_request_s fsync; |
| 253 | struct orangefs_param_request_s param; |
| 254 | struct orangefs_perf_count_request_s perf_count; |
| 255 | struct orangefs_fs_key_request_s fs_key; |
Martin Brandenburg | 482664d | 2016-08-12 12:02:31 -0400 | [diff] [blame] | 256 | struct orangefs_features_request_s features; |
Mike Marshall | f7ab093 | 2015-07-17 10:38:11 -0400 | [diff] [blame] | 257 | } req; |
| 258 | }; |
| 259 | |
| 260 | #endif /* __UPCALL_H */ |