1 #ifndef _VX_DLIMIT_CMD_H
2 #define _VX_DLIMIT_CMD_H
4 /* dlimit vserver commands */
6 #define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
7 #define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
9 #define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
10 #define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
12 struct vcmd_ctx_dlimit_base_v0 {
13 const char __user *name;
17 struct vcmd_ctx_dlimit_v0 {
18 const char __user *name;
19 uint32_t space_used; /* used space in kbytes */
20 uint32_t space_total; /* maximum space in kbytes */
21 uint32_t inodes_used; /* used inodes */
22 uint32_t inodes_total; /* maximum inodes */
23 uint32_t reserved; /* reserved for root in % */
32 struct vcmd_ctx_dlimit_base_v0_x32 {
33 compat_uptr_t name_ptr;
37 struct vcmd_ctx_dlimit_v0_x32 {
38 compat_uptr_t name_ptr;
39 uint32_t space_used; /* used space in kbytes */
40 uint32_t space_total; /* maximum space in kbytes */
41 uint32_t inodes_used; /* used inodes */
42 uint32_t inodes_total; /* maximum inodes */
43 uint32_t reserved; /* reserved for root in % */
47 #endif /* CONFIG_COMPAT */
49 #include <linux/compiler.h>
51 extern int vc_add_dlimit(uint32_t, void __user *);
52 extern int vc_rem_dlimit(uint32_t, void __user *);
54 extern int vc_set_dlimit(uint32_t, void __user *);
55 extern int vc_get_dlimit(uint32_t, void __user *);
59 extern int vc_add_dlimit_x32(uint32_t, void __user *);
60 extern int vc_rem_dlimit_x32(uint32_t, void __user *);
62 extern int vc_set_dlimit_x32(uint32_t, void __user *);
63 extern int vc_get_dlimit_x32(uint32_t, void __user *);
65 #endif /* CONFIG_COMPAT */
67 #endif /* __KERNEL__ */
68 #endif /* _VX_DLIMIT_CMD_H */