updated
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 19 May 2005 18:10:26 +0000 (18:10 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 19 May 2005 18:10:26 +0000 (18:10 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2097 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/kernel/context.h
util-vserver/kernel/cvirt.h
util-vserver/kernel/dlimit.h
util-vserver/kernel/dlimit_cmd.h
util-vserver/kernel/inode_cmd.h
util-vserver/kernel/legacy.h
util-vserver/kernel/signal_cmd.h [moved from util-vserver/kernel/signal.h with 75% similarity]
util-vserver/kernel/xid.h

index eae7ec4..a5a77e0 100644 (file)
@@ -52,6 +52,7 @@
 #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_QUOTA_CTL          0x00100000
 
 
-/* vshelper sync commands */
+/* context state changes */
 
-#define        VS_CONTEXT_CREATED      1
-#define        VS_CONTEXT_DESTROY      2
+enum {
+       VSC_STARTUP = 1,
+       VSC_SHUTDOWN,
+};
 
 
 #ifdef __KERNEL__
@@ -94,7 +97,7 @@ struct vx_info {
        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 */
@@ -145,7 +148,7 @@ extern int xid_is_hashed(xid_t);
 
 extern int vx_migrate_task(struct task_struct *, struct vx_info *);
 
-extern long vs_context_state(struct vx_info *, unsigned int);
+extern long vs_state_change(struct vx_info *, unsigned int);
 
 extern void free_vx_info(struct vx_info *);
 
index a3cadfd..eb13878 100644 (file)
@@ -13,6 +13,10 @@ struct vx_info;
 void vx_update_load(struct vx_info *);
 
 
+int vx_uts_virt_handler(struct ctl_table *ctl, int write, xid_t xid,
+       void **datap, size_t *lenp);
+
+
 int vx_do_syslog(int, char __user *, int);
 
 #endif /* __KERNEL__ */
index 5bfaee1..99c2240 100644 (file)
@@ -2,7 +2,6 @@
 #define _VX_DLIMIT_H
 
 #include "switch.h"
-#include <linux/spinlock.h>
 
 #define CDLIM_UNSET            (0ULL)
 #define CDLIM_INFINITY         (~0ULL)
@@ -11,6 +10,8 @@
 
 #ifdef __KERNEL__
 
+#include <linux/spinlock.h>
+
 struct super_block;
 
 struct dl_info {
index fe6ccc3..b91a946 100644 (file)
@@ -27,13 +27,15 @@ struct      vcmd_ctx_dlimit_v0 {
 
 #ifdef __KERNEL__
 
+#ifdef CONFIG_COMPAT
+
 struct vcmd_ctx_dlimit_base_v0_x32 {
-       uint32_t __user name_ptr;
+       compat_uptr_t name_ptr;
        uint32_t flags;
 };
 
 struct vcmd_ctx_dlimit_v0_x32 {
-       uint32_t __user name_ptr;
+       compat_uptr_t name_ptr;
        uint32_t space_used;                    /* used space in kbytes */
        uint32_t space_total;                   /* maximum space in kbytes */
        uint32_t inodes_used;                   /* used inodes */
@@ -42,6 +44,8 @@ struct        vcmd_ctx_dlimit_v0_x32 {
        uint32_t flags;
 };
 
+#endif /* CONFIG_COMPAT */
+
 #include <linux/compiler.h>
 
 extern int vc_add_dlimit(uint32_t, void __user *);
@@ -50,5 +54,15 @@ 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 *);
 
+#ifdef CONFIG_COMPAT
+
+extern int vc_add_dlimit_x32(uint32_t, void __user *);
+extern int vc_rem_dlimit_x32(uint32_t, void __user *);
+
+extern int vc_set_dlimit_x32(uint32_t, void __user *);
+extern int vc_get_dlimit_x32(uint32_t, void __user *);
+
+#endif /* CONFIG_COMPAT */
+
 #endif /* __KERNEL__ */
 #endif /* _VX_DLIMIT_CMD_H */
index 5733aa6..f14c899 100644 (file)
@@ -27,13 +27,17 @@ struct      vcmd_ctx_iattr_v1 {
 
 #ifdef __KERNEL__
 
+#ifdef CONFIG_COMPAT
+
 struct vcmd_ctx_iattr_v1_x32 {
-       uint32_t __user name;
+       compat_uptr_t name_ptr;
        uint32_t xid;
        uint32_t flags;
        uint32_t mask;
 };
 
+#endif /* CONFIG_COMPAT */
+
 #include <linux/compiler.h>
 
 extern int vc_get_iattr_v0(uint32_t, void __user *);
@@ -42,5 +46,12 @@ extern int vc_set_iattr_v0(uint32_t, void __user *);
 extern int vc_get_iattr(uint32_t, void __user *);
 extern int vc_set_iattr(uint32_t, void __user *);
 
+#ifdef CONFIG_COMPAT
+
+extern int vc_get_iattr_x32(uint32_t, void __user *);
+extern int vc_set_iattr_x32(uint32_t, void __user *);
+
+#endif /* CONFIG_COMPAT */
+
 #endif /* __KERNEL__ */
 #endif /* _VX_INODE_CMD_H */
index d5b8a3f..f058983 100644 (file)
@@ -40,11 +40,6 @@ struct       vcmd_set_ipv4root_v3 {
 #define VX_INFO_NAMESPACE      128     /* save private namespace */
 
 
-#define NB_S_CONTEXT   16
-
-#define NB_IPV4ROOT    16
-
-
 #ifdef __KERNEL__
 extern int vc_new_s_context(uint32_t, void __user *);
 extern int vc_set_ipv4root(uint32_t, void __user *);
similarity index 75%
rename from util-vserver/kernel/signal.h
rename to util-vserver/kernel/signal_cmd.h
index 7d0d430..e842538 100644 (file)
@@ -1,9 +1,7 @@
-#ifndef _VX_SIGNAL_H
-#define _VX_SIGNAL_H
+#ifndef _VX_SIGNAL_CMD_H
+#define _VX_SIGNAL_CMD_H
 
-#include "switch.h"
-
-/*  context signalling */
+/*  signalling vserver commands */
 
 #define VCMD_ctx_kill          VC_CMD(PROCTRL, 1, 0)
 #define VCMD_wait_exit         VC_CMD(EVENT, 99, 0)
@@ -24,4 +22,4 @@ extern int vc_ctx_kill(uint32_t, void __user *);
 extern int vc_wait_exit(uint32_t, void __user *);
 
 #endif /* __KERNEL__ */
-#endif /* _VX_SIGNAL_H */
+#endif /* _VX_SIGNAL_CMD_H */
index 5d1c6c1..c1994c0 100644 (file)
@@ -9,6 +9,12 @@
        (((struct inode *)in)->i_sb && \
        (((struct inode *)in)->i_sb->s_flags & MS_TAGXID)))
 
+#ifdef CONFIG_XID_TAG_NFSD
+#define        XID_TAG_NFSD    1
+#else
+#define        XID_TAG_NFSD    0
+#endif
+
 
 #ifdef CONFIG_INOXID_NONE