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 % */
28 #define CDLIM_UNSET ((uint32_t)0UL)
29 #define CDLIM_INFINITY ((uint32_t)~0UL)
30 #define CDLIM_KEEP ((uint32_t)~1UL)
36 #include <asm/compat.h>
38 struct vcmd_ctx_dlimit_base_v0_x32 {
39 compat_uptr_t name_ptr;
43 struct vcmd_ctx_dlimit_v0_x32 {
44 compat_uptr_t name_ptr;
45 uint32_t space_used; /* used space in kbytes */
46 uint32_t space_total; /* maximum space in kbytes */
47 uint32_t inodes_used; /* used inodes */
48 uint32_t inodes_total; /* maximum inodes */
49 uint32_t reserved; /* reserved for root in % */
53 #endif /* CONFIG_COMPAT */
55 #include <linux/compiler.h>
57 extern int vc_add_dlimit(uint32_t, void __user *);
58 extern int vc_rem_dlimit(uint32_t, void __user *);
60 extern int vc_set_dlimit(uint32_t, void __user *);
61 extern int vc_get_dlimit(uint32_t, void __user *);
65 extern int vc_add_dlimit_x32(uint32_t, void __user *);
66 extern int vc_rem_dlimit_x32(uint32_t, void __user *);
68 extern int vc_set_dlimit_x32(uint32_t, void __user *);
69 extern int vc_get_dlimit_x32(uint32_t, void __user *);
71 #endif /* CONFIG_COMPAT */
73 #endif /* __KERNEL__ */
74 #endif /* _VX_DLIMIT_CMD_H */