git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
linux
/
vserver
/
dlimit.h
diff --git
a/include/linux/vserver/dlimit.h
b/include/linux/vserver/dlimit.h
index
14a68fd
..
583aa22
100644
(file)
--- a/
include/linux/vserver/dlimit.h
+++ b/
include/linux/vserver/dlimit.h
@@
-2,57
+2,33
@@
#define _VX_DLIMIT_H
#include "switch.h"
#define _VX_DLIMIT_H
#include "switch.h"
-#include <linux/spinlock.h>
-
-/* inode vserver commands */
-
-#define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
-#define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
-
-#define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
-#define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
-struct vcmd_ctx_dlimit_base_v0 {
- const char __user *name;
- uint32_t flags;
-};
-
-struct vcmd_ctx_dlimit_v0 {
- const char __user *name;
- uint32_t space_used; /* used space in kbytes */
- uint32_t space_total; /* maximum space in kbytes */
- uint32_t inodes_used; /* used inodes */
- uint32_t inodes_total; /* maximum inodes */
- uint32_t reserved; /* reserved for root in % */
- uint32_t flags;
-};
+#ifdef __KERNEL__
-#define CDLIM_UNSET (0ULL)
-#define CDLIM_INFINITY (~0ULL)
-#define CDLIM_KEEP (~1ULL)
+/* keep in sync with CDLIM_INFINITY */
+#define DLIM_INFINITY (~0ULL)
-#i
fdef __KERNEL__
+#i
nclude <linux/spinlock.h>
struct super_block;
struct dl_info {
struct hlist_node dl_hlist; /* linked list of contexts */
struct rcu_head dl_rcu; /* the rcu head */
struct super_block;
struct dl_info {
struct hlist_node dl_hlist; /* linked list of contexts */
struct rcu_head dl_rcu; /* the rcu head */
-
xid_t dl_xid; /* context id
*/
+
tag_t dl_tag; /* context tag
*/
atomic_t dl_usecnt; /* usage count */
atomic_t dl_refcnt; /* reference count */
struct super_block *dl_sb; /* associated superblock */
atomic_t dl_usecnt; /* usage count */
atomic_t dl_refcnt; /* reference count */
struct super_block *dl_sb; /* associated superblock */
-// struct rw_semaphore dl_sem; /* protect the values */
spinlock_t dl_lock; /* protect the values */
spinlock_t dl_lock; /* protect the values */
- u
int64_t dl_space_used;
/* used space in bytes */
- u
int64_t dl_space_total;
/* maximum space in bytes */
- u
int32_t dl_inodes_used;
/* used inodes */
- u
int32_t dl_inodes_total;
/* maximum inodes */
+ u
nsigned long long dl_space_used;
/* used space in bytes */
+ u
nsigned long long dl_space_total;
/* maximum space in bytes */
+ u
nsigned long dl_inodes_used;
/* used inodes */
+ u
nsigned long dl_inodes_total;
/* maximum inodes */
unsigned int dl_nrlmult; /* non root limit mult */
};
unsigned int dl_nrlmult; /* non root limit mult */
};
@@
-62,24
+38,16
@@
struct rcu_head;
extern void rcu_free_dl_info(struct rcu_head *);
extern void unhash_dl_info(struct dl_info *);
extern void rcu_free_dl_info(struct rcu_head *);
extern void unhash_dl_info(struct dl_info *);
-extern struct dl_info *locate_dl_info(struct super_block *,
xid
_t);
+extern struct dl_info *locate_dl_info(struct super_block *,
tag
_t);
struct kstatfs;
extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
struct kstatfs;
extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
-
-extern int vc_add_dlimit(uint32_t, void __user *);
-extern int vc_rem_dlimit(uint32_t, void __user *);
-
-extern int vc_set_dlimit(uint32_t, void __user *);
-extern int vc_get_dlimit(uint32_t, void __user *);
-
-
typedef uint64_t dlsize_t;
typedef uint64_t dlsize_t;
-
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
-
+#else /* _VX_DLIMIT_H */
+#warning duplicate inclusion
#endif /* _VX_DLIMIT_H */
#endif /* _VX_DLIMIT_H */