Whamcloud - gitweb
Over of the changes:
[fs/lustre-release.git] / lustre / include / linux / obd_rpc.h
1 #ifndef __OBD_RPC_H
2 #define __OBD_RPC_H
3
4 #define OBD_TGT_VERSION  001
5
6 #define OBD_TGT_TCP  0x1
7 #define OBD_TGT_INTR 0x2
8 #define OBD_TGT_SOFT 0x4
9
10
11
12
13 /* error codes */
14
15 enum obd_stat {
16  OBD_OK = 0,
17  OBDERR_PERM = 1, 
18  OBDERR_NOENT = 2,
19  OBDERR_IO = 5,
20  OBDERR_NXIO = 6,
21  OBDERR_ACCESS = 13,
22  OBDERR_EXIST = 17,
23  OBDERR_XDEV = 18, 
24  OBDERR_NODEV = 19,
25  OBDERR_INVAL = 22,
26  OBDERR_FBIG = 27,
27  OBDERR_NOSPC = 28,
28  OBDERR_ROFS = 30,
29  OBDERR_OPNOTSUPP = 45,
30  OBDERR_DQUOT = 69
31 };
32
33
34
35 #define OBD_PROGRAM             100003
36 #define OBD_VERSION             2
37 #define OBDPROC_NULL            0
38 #define OBDPROC_GETATTR         1
39 #define OBDPROC_SETATTR         2
40 #define OBDPROC_ROOT            3
41 #define OBDPROC_LOOKUP          4
42 #define OBDPROC_READLINK        5
43 #define OBDPROC_READ            6
44 #define OBDPROC_WRITECACHE      7
45 #define OBDPROC_WRITE           8
46 #define OBDPROC_CREATE          9
47 #define OBDPROC_REMOVE          10
48 #define OBDPROC_RENAME          11
49 #define OBDPROC_LINK            12
50 #define OBDPROC_SYMLINK         13
51 #define OBDPROC_MKDIR           14
52
53
54
55 extern struct rpc_program obd_program;
56
57
58
59
60
61
62 struct obd_target {
63         struct sockaddr_in tgt_addr;
64         int tgt_flags;
65         int tgt_timeo;
66         int tgt_retrans;
67         int tgt_hostnamelen;
68         char tgt_hostname[0];
69         
70 };
71
72
73 struct rpc_obd {
74         struct rpc_clnt *       client;         /* RPC client handle */
75         struct sockaddr_in     addr;
76         int                     flags;          /* various flags */
77         int                     rsize;          /* read size */
78         int                     wsize;          /* write size */
79         unsigned int            bsize;          /* server block size */
80         char *                  hostname;       /* remote hostname */
81 };
82
83
84 #endif