7 /* inode vserver commands */
9 #define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
10 #define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
12 #define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
13 #define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
16 struct vcmd_ctx_dlimit_base_v0 {
21 struct vcmd_ctx_dlimit_v0 {
23 uint32_t space_used; /* used space in kbytes */
24 uint32_t space_total; /* maximum space in kbytes */
25 uint32_t inodes_used; /* used inodes */
26 uint32_t inodes_total; /* maximum inodes */
27 uint32_t reserved; /* reserved for root in % */
31 #define CDLIM_UNSET (0ULL)
32 #define CDLIM_INFINITY (~0ULL)
33 #define CDLIM_KEEP (~1ULL)
41 struct hlist_node dl_hlist; /* linked list of contexts */
42 struct rcu_head dl_rcu; /* the rcu head */
43 xid_t dl_xid; /* context id */
44 atomic_t dl_usecnt; /* usage count */
45 atomic_t dl_refcnt; /* reference count */
47 struct super_block *dl_sb; /* associated superblock */
49 struct rw_semaphore dl_sem; /* protect the values */
51 uint64_t dl_space_used; /* used space in bytes */
52 uint64_t dl_space_total; /* maximum space in bytes */
53 uint32_t dl_inodes_used; /* used inodes */
54 uint32_t dl_inodes_total; /* maximum inodes */
56 unsigned int dl_nrlmult; /* non root limit mult */
59 extern void rcu_free_dl_info(void *);
60 extern void unhash_dl_info(struct dl_info *);
64 extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
67 extern int vc_add_dlimit(uint32_t, void __user *);
68 extern int vc_rem_dlimit(uint32_t, void __user *);
70 extern int vc_set_dlimit(uint32_t, void __user *);
71 extern int vc_get_dlimit(uint32_t, void __user *);
74 #endif /* __KERNEL__ */
76 #endif /* _VX_DLIMIT_H */