1 #ifndef _VX_DLIMIT_CMD_H
2 #define _VX_DLIMIT_CMD_H
5 /* dlimit vserver commands */
7 #define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
8 #define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
10 #define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
11 #define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
13 struct vcmd_ctx_dlimit_base_v0 {
14 const char __user *name;
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 % */
33 struct vcmd_ctx_dlimit_base_v0_x32 {
34 compat_uptr_t name_ptr;
38 struct vcmd_ctx_dlimit_v0_x32 {
39 compat_uptr_t name_ptr;
40 uint32_t space_used; /* used space in kbytes */
41 uint32_t space_total; /* maximum space in kbytes */
42 uint32_t inodes_used; /* used inodes */
43 uint32_t inodes_total; /* maximum inodes */
44 uint32_t reserved; /* reserved for root in % */
48 #endif /* CONFIG_COMPAT */
50 #include <linux/compiler.h>
52 extern int vc_add_dlimit(uint32_t, void __user *);
53 extern int vc_rem_dlimit(uint32_t, void __user *);
55 extern int vc_set_dlimit(uint32_t, void __user *);
56 extern int vc_get_dlimit(uint32_t, void __user *);
60 extern int vc_add_dlimit_x32(uint32_t, void __user *);
61 extern int vc_rem_dlimit_x32(uint32_t, void __user *);
63 extern int vc_set_dlimit_x32(uint32_t, void __user *);
64 extern int vc_get_dlimit_x32(uint32_t, void __user *);
66 #endif /* CONFIG_COMPAT */
68 #endif /* __KERNEL__ */
69 #endif /* _VX_DLIMIT_CMD_H */