Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / linux / vserver / dlimit_cmd.h
1 #ifndef _VX_DLIMIT_CMD_H
2 #define _VX_DLIMIT_CMD_H
3
4
5 /*  dlimit vserver commands */
6
7 #define VCMD_add_dlimit         VC_CMD(DLIMIT, 1, 0)
8 #define VCMD_rem_dlimit         VC_CMD(DLIMIT, 2, 0)
9
10 #define VCMD_set_dlimit         VC_CMD(DLIMIT, 5, 0)
11 #define VCMD_get_dlimit         VC_CMD(DLIMIT, 6, 0)
12
13 struct  vcmd_ctx_dlimit_base_v0 {
14         const char __user *name;
15         uint32_t flags;
16 };
17
18 struct  vcmd_ctx_dlimit_v0 {
19         const char __user *name;
20         uint32_t space_used;                    /* used space in kbytes */
21         uint32_t space_total;                   /* maximum space in kbytes */
22         uint32_t inodes_used;                   /* used inodes */
23         uint32_t inodes_total;                  /* maximum inodes */
24         uint32_t reserved;                      /* reserved for root in % */
25         uint32_t flags;
26 };
27
28
29 #ifdef  __KERNEL__
30
31 #ifdef  CONFIG_COMPAT
32
33 #include <asm/compat.h>
34
35 struct  vcmd_ctx_dlimit_base_v0_x32 {
36         compat_uptr_t name_ptr;
37         uint32_t flags;
38 };
39
40 struct  vcmd_ctx_dlimit_v0_x32 {
41         compat_uptr_t name_ptr;
42         uint32_t space_used;                    /* used space in kbytes */
43         uint32_t space_total;                   /* maximum space in kbytes */
44         uint32_t inodes_used;                   /* used inodes */
45         uint32_t inodes_total;                  /* maximum inodes */
46         uint32_t reserved;                      /* reserved for root in % */
47         uint32_t flags;
48 };
49
50 #endif  /* CONFIG_COMPAT */
51
52 #include <linux/compiler.h>
53
54 extern int vc_add_dlimit(uint32_t, void __user *);
55 extern int vc_rem_dlimit(uint32_t, void __user *);
56
57 extern int vc_set_dlimit(uint32_t, void __user *);
58 extern int vc_get_dlimit(uint32_t, void __user *);
59
60 #ifdef  CONFIG_COMPAT
61
62 extern int vc_add_dlimit_x32(uint32_t, void __user *);
63 extern int vc_rem_dlimit_x32(uint32_t, void __user *);
64
65 extern int vc_set_dlimit_x32(uint32_t, void __user *);
66 extern int vc_get_dlimit_x32(uint32_t, void __user *);
67
68 #endif  /* CONFIG_COMPAT */
69
70 #endif  /* __KERNEL__ */
71 #endif  /* _VX_DLIMIT_CMD_H */