Add changes from the Linux-2.6 tree.
[linux-2.6.git] / include / linux / vserver / inode_cmd.h
1 #ifndef _VX_INODE_CMD_H
2 #define _VX_INODE_CMD_H
3
4
5 /*  inode vserver commands */
6
7 #define VCMD_get_iattr_v0       VC_CMD(INODE, 1, 0)
8 #define VCMD_set_iattr_v0       VC_CMD(INODE, 2, 0)
9
10 #define VCMD_get_iattr          VC_CMD(INODE, 1, 1)
11 #define VCMD_set_iattr          VC_CMD(INODE, 2, 1)
12
13 #define VCMD_fget_iattr         VC_CMD(INODE, 3, 0)
14 #define VCMD_fset_iattr         VC_CMD(INODE, 4, 0)
15
16 struct  vcmd_ctx_iattr_v0 {
17         /* device handle in id */
18         uint64_t ino;
19         uint32_t xid;
20         uint32_t flags;
21         uint32_t mask;
22 };
23
24 struct  vcmd_ctx_iattr_v1 {
25         const char __user *name;
26         uint32_t xid;
27         uint32_t flags;
28         uint32_t mask;
29 };
30
31 struct vcmd_ctx_fiattr_v0 {
32         uint32_t xid;
33         uint32_t flags;
34         uint32_t mask;
35 };
36
37
38 #ifdef  __KERNEL__
39
40
41 #ifdef  CONFIG_COMPAT
42
43 #include <asm/compat.h>
44
45 struct  vcmd_ctx_iattr_v1_x32 {
46         compat_uptr_t name_ptr;
47         uint32_t xid;
48         uint32_t flags;
49         uint32_t mask;
50 };
51
52 #endif  /* CONFIG_COMPAT */
53
54 #include <linux/compiler.h>
55
56 extern int vc_get_iattr_v0(uint32_t, void __user *);
57 extern int vc_set_iattr_v0(uint32_t, void __user *);
58
59 extern int vc_get_iattr(uint32_t, void __user *);
60 extern int vc_set_iattr(uint32_t, void __user *);
61
62 extern int vc_fget_iattr(uint32_t, void __user *);
63 extern int vc_fset_iattr(uint32_t, void __user *);
64
65 #ifdef  CONFIG_COMPAT
66
67 extern int vc_get_iattr_x32(uint32_t, void __user *);
68 extern int vc_set_iattr_x32(uint32_t, void __user *);
69
70 #endif  /* CONFIG_COMPAT */
71
72 #endif  /* __KERNEL__ */
73 #endif  /* _VX_INODE_CMD_H */