Merge tag 'mac80211-for-davem-2016-08-30' of git://git.kernel.org/pub/scm/linux/kerne...
[deliverable/linux.git] / fs / orangefs / downcall.h
CommitLineData
f7ab093f
MM
1/*
2 * (C) 2001 Clemson University and The University of Chicago
3 *
4 * See COPYING in top-level directory.
5 */
6
7/*
8 * Definitions of downcalls used in Linux kernel module.
9 */
10
11#ifndef __DOWNCALL_H
12#define __DOWNCALL_H
13
14/*
15 * Sanitized the device-client core interaction
16 * for clean 32-64 bit usage
17 */
8bb8aefd 18struct orangefs_io_response {
f7ab093f
MM
19 __s64 amt_complete;
20};
21
8bb8aefd
YL
22struct orangefs_lookup_response {
23 struct orangefs_object_kref refn;
f7ab093f
MM
24};
25
8bb8aefd
YL
26struct orangefs_create_response {
27 struct orangefs_object_kref refn;
f7ab093f
MM
28};
29
8bb8aefd
YL
30struct orangefs_symlink_response {
31 struct orangefs_object_kref refn;
f7ab093f
MM
32};
33
8bb8aefd
YL
34struct orangefs_getattr_response {
35 struct ORANGEFS_sys_attr_s attributes;
47b4948f 36 char link_target[ORANGEFS_NAME_MAX];
f7ab093f
MM
37};
38
8bb8aefd
YL
39struct orangefs_mkdir_response {
40 struct orangefs_object_kref refn;
f7ab093f
MM
41};
42
43/*
44 * duplication of some system interface structures so that I don't have
45 * to allocate extra memory
46 */
8bb8aefd 47struct orangefs_dirent {
f7ab093f
MM
48 char *d_name;
49 int d_length;
8bb8aefd 50 struct orangefs_khandle khandle;
f7ab093f
MM
51};
52
8bb8aefd 53struct orangefs_statfs_response {
f7ab093f
MM
54 __s64 block_size;
55 __s64 blocks_total;
56 __s64 blocks_avail;
57 __s64 files_total;
58 __s64 files_avail;
59};
60
8bb8aefd 61struct orangefs_fs_mount_response {
f7ab093f
MM
62 __s32 fs_id;
63 __s32 id;
8bb8aefd 64 struct orangefs_khandle root_khandle;
f7ab093f
MM
65};
66
67/* the getxattr response is the attribute value */
8bb8aefd 68struct orangefs_getxattr_response {
f7ab093f
MM
69 __s32 val_sz;
70 __s32 __pad1;
8bb8aefd 71 char val[ORANGEFS_MAX_XATTR_VALUELEN];
f7ab093f
MM
72};
73
74/* the listxattr response is an array of attribute names */
8bb8aefd 75struct orangefs_listxattr_response {
f7ab093f
MM
76 __s32 returned_count;
77 __s32 __pad1;
78 __u64 token;
8bb8aefd 79 char key[ORANGEFS_MAX_XATTR_LISTLEN * ORANGEFS_MAX_XATTR_NAMELEN];
f7ab093f
MM
80 __s32 keylen;
81 __s32 __pad2;
8bb8aefd 82 __s32 lengths[ORANGEFS_MAX_XATTR_LISTLEN];
f7ab093f
MM
83};
84
8bb8aefd 85struct orangefs_param_response {
f7ab093f
MM
86 __s64 value;
87};
88
89#define PERF_COUNT_BUF_SIZE 4096
8bb8aefd 90struct orangefs_perf_count_response {
f7ab093f
MM
91 char buffer[PERF_COUNT_BUF_SIZE];
92};
93
94#define FS_KEY_BUF_SIZE 4096
8bb8aefd 95struct orangefs_fs_key_response {
f7ab093f
MM
96 __s32 fs_keylen;
97 __s32 __pad1;
98 char fs_key[FS_KEY_BUF_SIZE];
99};
100
8bb8aefd 101struct orangefs_downcall_s {
f7ab093f
MM
102 __s32 type;
103 __s32 status;
104 /* currently trailer is used only by readdir */
105 __s64 trailer_size;
54804949 106 char *trailer_buf;
f7ab093f
MM
107
108 union {
8bb8aefd
YL
109 struct orangefs_io_response io;
110 struct orangefs_lookup_response lookup;
111 struct orangefs_create_response create;
112 struct orangefs_symlink_response sym;
113 struct orangefs_getattr_response getattr;
114 struct orangefs_mkdir_response mkdir;
115 struct orangefs_statfs_response statfs;
116 struct orangefs_fs_mount_response fs_mount;
117 struct orangefs_getxattr_response getxattr;
118 struct orangefs_listxattr_response listxattr;
119 struct orangefs_param_response param;
120 struct orangefs_perf_count_response perf_count;
121 struct orangefs_fs_key_response fs_key;
f7ab093f
MM
122 } resp;
123};
124
8bb8aefd 125struct orangefs_readdir_response_s {
f7ab093f
MM
126 __u64 token;
127 __u64 directory_version;
128 __u32 __pad2;
8bb8aefd
YL
129 __u32 orangefs_dirent_outcount;
130 struct orangefs_dirent *dirent_array;
f7ab093f
MM
131};
132
133#endif /* __DOWNCALL_H */
This page took 0.057082 seconds and 5 git commands to generate.