Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * (C) 2001 Clemson University and The University of Chicago
0004  *
0005  * See COPYING in top-level directory.
0006  */
0007 
0008 #ifndef __UPCALL_H
0009 #define __UPCALL_H
0010 
0011 /*
0012  * Sanitized this header file to fix
0013  * 32-64 bit interaction issues between
0014  * client-core and device
0015  */
0016 struct orangefs_io_request_s {
0017     __s32 __pad1;
0018     __s32 buf_index;
0019     __s32 count;
0020     __s32 __pad2;
0021     __s64 offset;
0022     struct orangefs_object_kref refn;
0023     enum ORANGEFS_io_type io_type;
0024     __s32 readahead_size;
0025 };
0026 
0027 struct orangefs_lookup_request_s {
0028     __s32 sym_follow;
0029     __s32 __pad1;
0030     struct orangefs_object_kref parent_refn;
0031     char d_name[ORANGEFS_NAME_MAX];
0032 };
0033 
0034 struct orangefs_create_request_s {
0035     struct orangefs_object_kref parent_refn;
0036     struct ORANGEFS_sys_attr_s attributes;
0037     char d_name[ORANGEFS_NAME_MAX];
0038 };
0039 
0040 struct orangefs_symlink_request_s {
0041     struct orangefs_object_kref parent_refn;
0042     struct ORANGEFS_sys_attr_s attributes;
0043     char entry_name[ORANGEFS_NAME_MAX];
0044     char target[ORANGEFS_NAME_MAX];
0045 };
0046 
0047 struct orangefs_getattr_request_s {
0048     struct orangefs_object_kref refn;
0049     __u32 mask;
0050     __u32 __pad1;
0051 };
0052 
0053 struct orangefs_setattr_request_s {
0054     struct orangefs_object_kref refn;
0055     struct ORANGEFS_sys_attr_s attributes;
0056 };
0057 
0058 struct orangefs_remove_request_s {
0059     struct orangefs_object_kref parent_refn;
0060     char d_name[ORANGEFS_NAME_MAX];
0061 };
0062 
0063 struct orangefs_mkdir_request_s {
0064     struct orangefs_object_kref parent_refn;
0065     struct ORANGEFS_sys_attr_s attributes;
0066     char d_name[ORANGEFS_NAME_MAX];
0067 };
0068 
0069 struct orangefs_readdir_request_s {
0070     struct orangefs_object_kref refn;
0071     __u64 token;
0072     __s32 max_dirent_count;
0073     __s32 buf_index;
0074 };
0075 
0076 struct orangefs_readdirplus_request_s {
0077     struct orangefs_object_kref refn;
0078     __u64 token;
0079     __s32 max_dirent_count;
0080     __u32 mask;
0081     __s32 buf_index;
0082     __s32 __pad1;
0083 };
0084 
0085 struct orangefs_rename_request_s {
0086     struct orangefs_object_kref old_parent_refn;
0087     struct orangefs_object_kref new_parent_refn;
0088     char d_old_name[ORANGEFS_NAME_MAX];
0089     char d_new_name[ORANGEFS_NAME_MAX];
0090 };
0091 
0092 struct orangefs_statfs_request_s {
0093     __s32 fs_id;
0094     __s32 __pad1;
0095 };
0096 
0097 struct orangefs_truncate_request_s {
0098     struct orangefs_object_kref refn;
0099     __s64 size;
0100 };
0101 
0102 struct orangefs_ra_cache_flush_request_s {
0103     struct orangefs_object_kref refn;
0104 };
0105 
0106 struct orangefs_fs_mount_request_s {
0107     char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN];
0108 };
0109 
0110 struct orangefs_fs_umount_request_s {
0111     __s32 id;
0112     __s32 fs_id;
0113     char orangefs_config_server[ORANGEFS_MAX_SERVER_ADDR_LEN];
0114 };
0115 
0116 struct orangefs_getxattr_request_s {
0117     struct orangefs_object_kref refn;
0118     __s32 key_sz;
0119     __s32 __pad1;
0120     char key[ORANGEFS_MAX_XATTR_NAMELEN];
0121 };
0122 
0123 struct orangefs_setxattr_request_s {
0124     struct orangefs_object_kref refn;
0125     struct ORANGEFS_keyval_pair keyval;
0126     __s32 flags;
0127     __s32 __pad1;
0128 };
0129 
0130 struct orangefs_listxattr_request_s {
0131     struct orangefs_object_kref refn;
0132     __s32 requested_count;
0133     __s32 __pad1;
0134     __u64 token;
0135 };
0136 
0137 struct orangefs_removexattr_request_s {
0138     struct orangefs_object_kref refn;
0139     __s32 key_sz;
0140     __s32 __pad1;
0141     char key[ORANGEFS_MAX_XATTR_NAMELEN];
0142 };
0143 
0144 struct orangefs_op_cancel_s {
0145     __u64 op_tag;
0146 };
0147 
0148 struct orangefs_fsync_request_s {
0149     struct orangefs_object_kref refn;
0150 };
0151 
0152 enum orangefs_param_request_type {
0153     ORANGEFS_PARAM_REQUEST_SET = 1,
0154     ORANGEFS_PARAM_REQUEST_GET = 2
0155 };
0156 
0157 enum orangefs_param_request_op {
0158     ORANGEFS_PARAM_REQUEST_OP_ACACHE_TIMEOUT_MSECS = 1,
0159     ORANGEFS_PARAM_REQUEST_OP_ACACHE_HARD_LIMIT = 2,
0160     ORANGEFS_PARAM_REQUEST_OP_ACACHE_SOFT_LIMIT = 3,
0161     ORANGEFS_PARAM_REQUEST_OP_ACACHE_RECLAIM_PERCENTAGE = 4,
0162     ORANGEFS_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS = 5,
0163     ORANGEFS_PARAM_REQUEST_OP_PERF_HISTORY_SIZE = 6,
0164     ORANGEFS_PARAM_REQUEST_OP_PERF_RESET = 7,
0165     ORANGEFS_PARAM_REQUEST_OP_NCACHE_TIMEOUT_MSECS = 8,
0166     ORANGEFS_PARAM_REQUEST_OP_NCACHE_HARD_LIMIT = 9,
0167     ORANGEFS_PARAM_REQUEST_OP_NCACHE_SOFT_LIMIT = 10,
0168     ORANGEFS_PARAM_REQUEST_OP_NCACHE_RECLAIM_PERCENTAGE = 11,
0169     ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_TIMEOUT_MSECS = 12,
0170     ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_HARD_LIMIT = 13,
0171     ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_SOFT_LIMIT = 14,
0172     ORANGEFS_PARAM_REQUEST_OP_STATIC_ACACHE_RECLAIM_PERCENTAGE = 15,
0173     ORANGEFS_PARAM_REQUEST_OP_CLIENT_DEBUG = 16,
0174     ORANGEFS_PARAM_REQUEST_OP_CCACHE_TIMEOUT_SECS = 17,
0175     ORANGEFS_PARAM_REQUEST_OP_CCACHE_HARD_LIMIT = 18,
0176     ORANGEFS_PARAM_REQUEST_OP_CCACHE_SOFT_LIMIT = 19,
0177     ORANGEFS_PARAM_REQUEST_OP_CCACHE_RECLAIM_PERCENTAGE = 20,
0178     ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_TIMEOUT_SECS = 21,
0179     ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_HARD_LIMIT = 22,
0180     ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_SOFT_LIMIT = 23,
0181     ORANGEFS_PARAM_REQUEST_OP_CAPCACHE_RECLAIM_PERCENTAGE = 24,
0182     ORANGEFS_PARAM_REQUEST_OP_TWO_MASK_VALUES = 25,
0183     ORANGEFS_PARAM_REQUEST_OP_READAHEAD_SIZE = 26,
0184     ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT = 27,
0185     ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT_SIZE = 28,
0186     ORANGEFS_PARAM_REQUEST_OP_READAHEAD_READCNT = 29,
0187 };
0188 
0189 struct orangefs_param_request_s {
0190     enum orangefs_param_request_type type;
0191     enum orangefs_param_request_op op;
0192     union {
0193         __s64 value64;
0194         __s32 value32[2];
0195     } u;
0196     char s_value[ORANGEFS_MAX_DEBUG_STRING_LEN];
0197 };
0198 
0199 enum orangefs_perf_count_request_type {
0200     ORANGEFS_PERF_COUNT_REQUEST_ACACHE = 1,
0201     ORANGEFS_PERF_COUNT_REQUEST_NCACHE = 2,
0202     ORANGEFS_PERF_COUNT_REQUEST_CAPCACHE = 3,
0203 };
0204 
0205 struct orangefs_perf_count_request_s {
0206     enum orangefs_perf_count_request_type type;
0207     __s32 __pad1;
0208 };
0209 
0210 struct orangefs_fs_key_request_s {
0211     __s32 fsid;
0212     __s32 __pad1;
0213 };
0214 
0215 /* 2.9.6 */
0216 struct orangefs_features_request_s {
0217     __u64 features;
0218 };
0219 
0220 struct orangefs_upcall_s {
0221     __s32 type;
0222     __u32 uid;
0223     __u32 gid;
0224     int pid;
0225     int tgid;
0226     /* Trailers unused but must be retained for protocol compatibility. */
0227     __s64 trailer_size;
0228     char *trailer_buf;
0229 
0230     union {
0231         struct orangefs_io_request_s io;
0232         struct orangefs_lookup_request_s lookup;
0233         struct orangefs_create_request_s create;
0234         struct orangefs_symlink_request_s sym;
0235         struct orangefs_getattr_request_s getattr;
0236         struct orangefs_setattr_request_s setattr;
0237         struct orangefs_remove_request_s remove;
0238         struct orangefs_mkdir_request_s mkdir;
0239         struct orangefs_readdir_request_s readdir;
0240         struct orangefs_readdirplus_request_s readdirplus;
0241         struct orangefs_rename_request_s rename;
0242         struct orangefs_statfs_request_s statfs;
0243         struct orangefs_truncate_request_s truncate;
0244         struct orangefs_ra_cache_flush_request_s ra_cache_flush;
0245         struct orangefs_fs_mount_request_s fs_mount;
0246         struct orangefs_fs_umount_request_s fs_umount;
0247         struct orangefs_getxattr_request_s getxattr;
0248         struct orangefs_setxattr_request_s setxattr;
0249         struct orangefs_listxattr_request_s listxattr;
0250         struct orangefs_removexattr_request_s removexattr;
0251         struct orangefs_op_cancel_s cancel;
0252         struct orangefs_fsync_request_s fsync;
0253         struct orangefs_param_request_s param;
0254         struct orangefs_perf_count_request_s perf_count;
0255         struct orangefs_fs_key_request_s fs_key;
0256         struct orangefs_features_request_s features;
0257     } req;
0258 };
0259 
0260 #endif /* __UPCALL_H */