Merge to Fedora kernel-2.6.7-1.492
[linux-2.6.git] / include / linux / vserver / context.h
index 7692603..36765de 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/list.h>
 #include <linux/spinlock.h>
+#include <linux/rcupdate.h>
 
 #define _VX_INFO_DEF_
 #include "cvirt.h"
 #undef _VX_INFO_DEF_
 
 struct vx_info {
-       struct list_head vx_list;               /* linked list of contexts */
+       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_refcount;                   /* refcount */
+       atomic_t vx_usecnt;                     /* usage count */
+       atomic_t vx_refcnt;                     /* reference count */
        struct vx_info *vx_parent;              /* parent context */
 
        struct namespace *vx_namespace;         /* private namespace */
@@ -42,10 +45,6 @@ struct vx_info {
 };
 
 
-extern spinlock_t vxlist_lock;
-extern struct list_head vx_infos;
-
-
 #define VX_ADMIN       0x0001
 #define VX_WATCH       0x0002
 #define VX_DUMMY       0x0008
@@ -63,11 +62,14 @@ extern struct list_head vx_infos;
 #define VX_ATR_MASK    0x0F00
 
 
-void free_vx_info(struct vx_info *);
+extern void rcu_free_vx_info(struct rcu_head *);
+extern void unhash_vx_info(struct vx_info *);
+
+extern struct vx_info *locate_vx_info(int);
+extern struct vx_info *locate_or_create_vx_info(int);
 
-extern struct vx_info *find_vx_info(int);
-extern struct vx_info *find_or_create_vx_info(int);
-extern int vx_info_id_valid(int);
+extern int get_xid_list(int, unsigned int *, int);
+extern int vx_info_is_hashed(xid_t);
 
 extern int vx_migrate_task(struct task_struct *, struct vx_info *);
 
@@ -147,6 +149,7 @@ extern int vc_set_cflags(uint32_t, void __user *);
 #define VXF_STATE_INIT         (1ULL<<33)
 
 #define        VXF_FORK_RSS            (1ULL<<48)
+#define        VXF_PROLIFIC            (1ULL<<49)
 
 #define VXF_ONE_TIME           (0x0003ULL<<32)
 
@@ -168,7 +171,7 @@ extern int vc_set_ccaps(uint32_t, void __user *);
 #define VXC_SET_UTSNAME                0x00000001
 #define VXC_SET_RLIMIT         0x00000002
 
-#define VXC_ICMP_PING          0x00000100
+#define VXC_RAW_ICMP           0x00000100
 
 #define VXC_SECURE_MOUNT       0x00010000