upcall.h 6.6 KB

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