f14c899ffd86c215dfd9fabd0bb2d82602a19f10
[util-vserver.git] / kernel / inode_cmd.h
1 #ifndef _VX_INODE_CMD_H
2 #define _VX_INODE_CMD_H
3
4 /*  inode vserver commands */
5
6 #define VCMD_get_iattr_v0       VC_CMD(INODE, 1, 0)
7 #define VCMD_set_iattr_v0       VC_CMD(INODE, 2, 0)
8
9 #define VCMD_get_iattr          VC_CMD(INODE, 1, 1)
10 #define VCMD_set_iattr          VC_CMD(INODE, 2, 1)
11
12 struct  vcmd_ctx_iattr_v0 {
13         /* device handle in id */
14         uint64_t ino;
15         uint32_t xid;
16         uint32_t flags;
17         uint32_t mask;
18 };
19
20 struct  vcmd_ctx_iattr_v1 {
21         const char __user *name;
22         uint32_t xid;
23         uint32_t flags;
24         uint32_t mask;
25 };
26
27
28 #ifdef  __KERNEL__
29
30 #ifdef  CONFIG_COMPAT
31
32 struct  vcmd_ctx_iattr_v1_x32 {
33         compat_uptr_t name_ptr;
34         uint32_t xid;
35         uint32_t flags;
36         uint32_t mask;
37 };
38
39 #endif  /* CONFIG_COMPAT */
40
41 #include <linux/compiler.h>
42
43 extern int vc_get_iattr_v0(uint32_t, void __user *);
44 extern int vc_set_iattr_v0(uint32_t, void __user *);
45
46 extern int vc_get_iattr(uint32_t, void __user *);
47 extern int vc_set_iattr(uint32_t, void __user *);
48
49 #ifdef  CONFIG_COMPAT
50
51 extern int vc_get_iattr_x32(uint32_t, void __user *);
52 extern int vc_set_iattr_x32(uint32_t, void __user *);
53
54 #endif  /* CONFIG_COMPAT */
55
56 #endif  /* __KERNEL__ */
57 #endif  /* _VX_INODE_CMD_H */