diff options
Diffstat (limited to 'vserver-sources/old/2.1.1_rc27/4418_vs2.1.1-vstat-feat01.patch')
-rw-r--r-- | vserver-sources/old/2.1.1_rc27/4418_vs2.1.1-vstat-feat01.patch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc27/4418_vs2.1.1-vstat-feat01.patch b/vserver-sources/old/2.1.1_rc27/4418_vs2.1.1-vstat-feat01.patch new file mode 100644 index 0000000..11692b4 --- /dev/null +++ b/vserver-sources/old/2.1.1_rc27/4418_vs2.1.1-vstat-feat01.patch @@ -0,0 +1,99 @@ +Index: linux-2.6.17/include/linux/vserver/cacct_cmd.h +=================================================================== +--- linux-2.6.17.orig/include/linux/vserver/cacct_cmd.h ++++ linux-2.6.17/include/linux/vserver/cacct_cmd.h +@@ -1,4 +1,34 @@ + #ifndef _VX_CACCT_CMD_H + #define _VX_CACCT_CMD_H + ++ ++/* accounting status commands */ ++ ++#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0) ++ ++struct vcmd_sock_stat_v0 { ++ uint32_t field; ++ uint32_t pad0; ++ uint64_t count; ++ uint64_t total; ++}; ++ ++ ++enum sock_stat_field { ++ SOCK_UNSPEC=0, ++ SOCK_UNIX, ++ SOCK_INET, ++ SOCK_INET6, ++ SOCK_PACKET, ++ SOCK_OTHER, ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++#include <linux/compiler.h> ++ ++extern int vc_sock_stat(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ + #endif /* _VX_CACCT_CMD_H */ +Index: linux-2.6.17/include/linux/vserver/limit_cmd.h +=================================================================== +--- linux-2.6.17.orig/include/linux/vserver/limit_cmd.h ++++ linux-2.6.17/include/linux/vserver/limit_cmd.h +@@ -22,6 +22,16 @@ struct vcmd_ctx_rlimit_mask_v0 { + uint32_t maximum; + }; + ++#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0) ++ ++struct vcmd_rlimit_stat_v0 { ++ uint32_t id; ++ uint32_t hits; ++ uint64_t value; ++ uint64_t minimum; ++ uint64_t maximum; ++}; ++ + #define CRLIM_UNSET (0ULL) + #define CRLIM_INFINITY (~0ULL) + #define CRLIM_KEEP (~1ULL) +@@ -46,6 +56,8 @@ extern int vc_get_rlimit(struct vx_info + extern int vc_set_rlimit(struct vx_info *, void __user *); + extern int vc_reset_minmax(struct vx_info *, void __user *); + ++extern int vc_rlimit_stat(struct vx_info *, void __user *); ++ + #ifdef CONFIG_IA32_EMULATION + + extern int vc_get_rlimit_x32(struct vx_info *, void __user *); +Index: linux-2.6.17/include/linux/vserver/switch.h +=================================================================== +--- linux-2.6.17.orig/include/linux/vserver/switch.h ++++ linux-2.6.17/include/linux/vserver/switch.h +@@ -34,7 +34,7 @@ + DISK | | | | |DLIMIT | | |INODE | | + VFS | 32| 33| 34| 35| 36| 37| | 38| 39| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ +- OTHER | | | | | | | |VINFO | | ++ OTHER |VSTAT | | | | | | |VINFO | | + | 40| 41| 42| 43| 44| 45| | 46| 47| + =======+=======+=======+=======+=======+=======+=======+ +=======+=======+ + SPECIAL|EVENT | | | |FLAGS | | | | | +@@ -66,6 +66,7 @@ + #define VC_CAT_DLIMIT 36 + #define VC_CAT_INODE 38 + ++#define VC_CAT_VSTAT 40 + #define VC_CAT_VINFO 46 + #define VC_CAT_EVENT 48 + +@@ -78,7 +79,7 @@ + + /* interface version */ + +-#define VCI_VERSION 0x00020101 ++#define VCI_VERSION 0x00020102 + #define VCI_LEGACY_VERSION 0x000100FF + + /* query version */ |