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
vserver 2.0-rc4
[linux-2.6.git]
/
include
/
linux
/
vserver
/
context.h
diff --git
a/include/linux/vserver/context.h
b/include/linux/vserver/context.h
index
dda32b4
..
79f9053
100644
(file)
--- a/
include/linux/vserver/context.h
+++ b/
include/linux/vserver/context.h
@@
-36,6
+36,8
@@
#define VXF_STATE_SETUP (1ULL<<32)
#define VXF_STATE_INIT (1ULL<<33)
#define VXF_STATE_SETUP (1ULL<<32)
#define VXF_STATE_INIT (1ULL<<33)
+#define VXF_STATE_HELPER (1ULL<<36)
+
#define VXF_FORK_RSS (1ULL<<48)
#define VXF_PROLIFIC (1ULL<<49)
#define VXF_FORK_RSS (1ULL<<48)
#define VXF_PROLIFIC (1ULL<<49)
@@
-43,6
+45,8
@@
#define VXF_ONE_TIME (0x0003ULL<<32)
#define VXF_ONE_TIME (0x0003ULL<<32)
+#define VXF_INIT_SET (VXF_STATE_SETUP|VXF_STATE_INIT)
+
/* context caps */
/* context caps */
@@
-52,6
+56,7
@@
#define VXC_SET_RLIMIT 0x00000002
#define VXC_RAW_ICMP 0x00000100
#define VXC_SET_RLIMIT 0x00000002
#define VXC_RAW_ICMP 0x00000100
+#define VXC_SYSLOG 0x00001000
#define VXC_SECURE_MOUNT 0x00010000
#define VXC_SECURE_REMOUNT 0x00020000
#define VXC_SECURE_MOUNT 0x00010000
#define VXC_SECURE_REMOUNT 0x00020000
@@
-60,10
+65,15
@@
#define VXC_QUOTA_CTL 0x00100000
#define VXC_QUOTA_CTL 0x00100000
-/*
vshelper sync command
s */
+/*
context state change
s */
-#define VS_CONTEXT_CREATED 1
-#define VS_CONTEXT_DESTROY 2
+enum {
+ VSC_STARTUP = 1,
+ VSC_SHUTDOWN,
+
+ VSC_NETUP,
+ VSC_NETDOWN,
+};
#ifdef __KERNEL__
#ifdef __KERNEL__
@@
-78,7
+88,6
@@
struct vx_info {
struct hlist_node vx_hlist; /* linked list of contexts */
struct vx_info {
struct hlist_node vx_hlist; /* linked list of contexts */
- struct rcu_head vx_rcu; /* the rcu head */
xid_t vx_id; /* context id */
atomic_t vx_usecnt; /* usage count */
atomic_t vx_tasks; /* tasks count */
xid_t vx_id; /* context id */
atomic_t vx_usecnt; /* usage count */
atomic_t vx_tasks; /* tasks count */
@@
-93,8
+102,7
@@
struct vx_info {
pid_t vx_initpid; /* PID of fake init process */
pid_t vx_initpid; /* PID of fake init process */
- spinlock_t vx_lock;
- wait_queue_head_t vx_exit; /* context exit waitqueue */
+ wait_queue_head_t vx_wait; /* context exit waitqueue */
struct _vx_limit limit; /* vserver limits */
struct _vx_sched sched; /* vserver scheduler */
struct _vx_limit limit; /* vserver limits */
struct _vx_sched sched; /* vserver scheduler */
@@
-111,7
+119,6
@@
struct vx_info {
#define VXS_PAUSED 0x0010
#define VXS_ONHOLD 0x0020
#define VXS_SHUTDOWN 0x0100
#define VXS_PAUSED 0x0010
#define VXS_ONHOLD 0x0020
#define VXS_SHUTDOWN 0x0100
-#define VXS_DEFUNCT 0x1000
#define VXS_RELEASED 0x8000
/* check conditions */
#define VXS_RELEASED 0x8000
/* check conditions */
@@
-145,9
+152,7
@@
extern int xid_is_hashed(xid_t);
extern int vx_migrate_task(struct task_struct *, struct vx_info *);
extern int vx_migrate_task(struct task_struct *, struct vx_info *);
-extern long vs_context_state(unsigned int);
-
-extern void free_vx_info(struct vx_info *);
+extern long vs_state_change(struct vx_info *, unsigned int);
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */