diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/Makefile linux-2.6.11.7-vs2.0-pre2/Makefile --- linux-2.6.11.7-vs2.0-pre1/Makefile 2005-04-14 21:51:44 +0200 +++ linux-2.6.11.7-vs2.0-pre2/Makefile 2005-04-23 01:33:35 +0200 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 11 -EXTRAVERSION = .7-vs2.0-pre1 +EXTRAVERSION = .7-vs2.0-pre2 NAME=Woozy Numbat # *DOCUMENTATION* diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/dlimit.h linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/dlimit.h --- linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/dlimit.h 2005-04-14 21:15:01 +0200 +++ linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/dlimit.h 2005-04-23 00:49:53 +0200 @@ -4,30 +4,6 @@ #include "switch.h" #include -/* 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; -}; - #define CDLIM_UNSET (0ULL) #define CDLIM_INFINITY (~0ULL) #define CDLIM_KEEP (~1ULL) @@ -46,7 +22,6 @@ struct dl_info { struct super_block *dl_sb; /* associated superblock */ -// struct rw_semaphore dl_sem; /* protect the values */ spinlock_t dl_lock; /* protect the values */ uint64_t dl_space_used; /* used space in bytes */ @@ -69,14 +44,6 @@ 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; #endif /* __KERNEL__ */ diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/dlimit_cmd.h linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/dlimit_cmd.h --- linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/dlimit_cmd.h 1970-01-01 01:00:00 +0100 +++ linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/dlimit_cmd.h 2005-04-23 00:48:35 +0200 @@ -0,0 +1,54 @@ +#ifndef _VX_DLIMIT_CMD_H +#define _VX_DLIMIT_CMD_H + +/* dlimit 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__ + +struct vcmd_ctx_dlimit_base_v0_x32 { + uint32_t __user name_ptr; + uint32_t flags; +}; + +struct vcmd_ctx_dlimit_v0_x32 { + uint32_t __user name_ptr; + 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; +}; + +#include + +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 *); + +#endif /* __KERNEL__ */ +#endif /* _VX_DLIMIT_CMD_H */ diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/inode_cmd.h linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/inode_cmd.h --- linux-2.6.11.7-vs2.0-pre1/include/linux/vserver/inode_cmd.h 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/inode_cmd.h 2005-04-23 00:48:14 +0200 @@ -27,6 +27,13 @@ struct vcmd_ctx_iattr_v1 { #ifdef __KERNEL__ +struct vcmd_ctx_iattr_v1_x32 { + uint32_t __user name; + uint32_t xid; + uint32_t flags; + uint32_t mask; +}; + #include extern int vc_get_iattr_v0(uint32_t, void __user *); diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/kernel/vserver/dlimit.c linux-2.6.11.7-vs2.0-pre2/kernel/vserver/dlimit.c --- linux-2.6.11.7-vs2.0-pre1/kernel/vserver/dlimit.c 2005-04-14 21:15:01 +0200 +++ linux-2.6.11.7-vs2.0-pre2/kernel/vserver/dlimit.c 2005-04-23 00:54:59 +0200 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/kernel/vserver/helper.c linux-2.6.11.7-vs2.0-pre2/kernel/vserver/helper.c --- linux-2.6.11.7-vs2.0-pre1/kernel/vserver/helper.c 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2/kernel/vserver/helper.c 2005-04-16 04:14:05 +0200 @@ -29,12 +29,13 @@ int do_vshelper(char *name, char *argv[] if ((ret = call_usermodehelper(name, argv, envp, sync))) { printk( KERN_WARNING - "%s: (%s %s) returned with %d\n", - name, argv[1], argv[2], ret); + "%s: (%s %s) returned %s with %d\n", + name, argv[1], argv[2], + sync?"sync":"async", ret); } vxdprintk(VXD_CBIT(switch, 1), - "%s: (%s %s) returned with %d", - name, argv[1], argv[2], ret); + "%s: (%s %s) returned %s with %d", + name, argv[1], argv[2], sync?"sync":"async", ret); return ret; } @@ -82,6 +83,9 @@ long vs_reboot(unsigned int cmd, void * case LINUX_REBOOT_CMD_SW_SUSPEND: argv[1] = "swsusp"; break; + + default: + return 0; } if (do_vshelper(vshelper_path, argv, envp, 1)) diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre1/kernel/vserver/switch.c linux-2.6.11.7-vs2.0-pre2/kernel/vserver/switch.c --- linux-2.6.11.7-vs2.0-pre1/kernel/vserver/switch.c 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2/kernel/vserver/switch.c 2005-04-23 00:53:15 +0200 @@ -36,6 +36,7 @@ vc_get_version(uint32_t id) #include #include #include +#include #include #include