This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / linux / vserver / inode.h
1 #ifndef _VX_INODE_H
2 #define _VX_INODE_H
3
4 #include "switch.h"
5
6 /*  inode vserver commands */
7
8 #define VCMD_get_iattr_v0       VC_CMD(INODE, 1, 0)
9 #define VCMD_set_iattr_v0       VC_CMD(INODE, 2, 0)
10
11 #define VCMD_get_iattr          VC_CMD(INODE, 1, 1)
12 #define VCMD_set_iattr          VC_CMD(INODE, 2, 1)
13
14 struct  vcmd_ctx_iattr_v0 {
15         /* device handle in id */
16         uint64_t ino;
17         uint32_t xid;
18         uint32_t flags;
19         uint32_t mask;
20 };
21
22 struct  vcmd_ctx_iattr_v1 {
23         const char __user *name;
24         uint32_t xid;
25         uint32_t flags;
26         uint32_t mask;
27 };
28
29
30 #define IATTR_XID       0x01000000
31
32 #define IATTR_ADMIN     0x00000001
33 #define IATTR_WATCH     0x00000002
34 #define IATTR_HIDE      0x00000004
35 #define IATTR_FLAGS     0x00000007
36
37 #define IATTR_BARRIER   0x00010000
38 #define IATTR_IUNLINK   0x00020000
39 #define IATTR_IMMUTABLE 0x00040000
40
41
42 #ifdef  CONFIG_PROC_SECURE
43 #define IATTR_PROC_DEFAULT      ( IATTR_ADMIN | IATTR_HIDE )
44 #define IATTR_PROC_SYMLINK      ( IATTR_ADMIN )
45 #else
46 #define IATTR_PROC_DEFAULT      ( IATTR_ADMIN )
47 #define IATTR_PROC_SYMLINK      ( IATTR_ADMIN )
48 #endif
49
50 #ifdef  __KERNEL__
51
52 #define vx_hide_check(c,m)      (((m) & IATTR_HIDE) ? vx_check(c,m) : 1)
53
54 extern int vc_get_iattr_v0(uint32_t, void __user *);
55 extern int vc_set_iattr_v0(uint32_t, void __user *);
56
57 extern int vc_get_iattr(uint32_t, void __user *);
58 extern int vc_set_iattr(uint32_t, void __user *);
59
60 #endif  /* __KERNEL__ */
61
62 /* inode ioctls */
63
64 #define FIOC_GETXFLG    _IOR('x', 5, long)
65 #define FIOC_SETXFLG    _IOW('x', 6, long)
66
67 #endif  /* _VX_INODE_H */