[Devel] [PATCH RHEL7 COMMIT] connector: store all private data on VE structure

Konstantin Khorenko khorenko at virtuozzo.com
Thu Aug 31 17:40:28 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit a74b5b56cac3c2212351dbc1e9ca957789221347
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Thu Aug 31 17:40:28 2017 +0300

    connector: store all private data on VE structure
    
    This is needed to containerize connector and its proc part.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 include/linux/connector.h | 9 +++++++++
 include/linux/ve.h        | 4 ++++
 2 files changed, 13 insertions(+)

diff --git a/include/linux/connector.h b/include/linux/connector.h
index 4c4d2b9..9e05e28 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -67,6 +67,15 @@ struct cn_dev {
 	struct cn_queue_dev *cbdev;
 };
 
+struct cn_private {
+	struct cn_dev   cdev;
+	int             cn_already_initialized;
+
+	atomic_t        proc_event_num_listeners;
+	u32 __percpu    *proc_event_counts;
+
+};
+
 int cn_add_callback(struct cb_id *id, const char *name,
 		    void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
 void cn_del_callback(struct cb_id *);
diff --git a/include/linux/ve.h b/include/linux/ve.h
index c9b0af4..d63edee 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -30,6 +30,7 @@ struct file_system_type;
 struct veip_struct;
 struct nsproxy;
 struct user_namespace;
+struct cn_private;
 extern struct user_namespace init_user_ns;
 
 struct ve_struct {
@@ -123,6 +124,9 @@ struct ve_struct {
 #ifdef CONFIG_COREDUMP
 	char 			core_pattern[CORENAME_MAX_SIZE];
 #endif
+#ifdef CONFIG_CONNECTOR
+	struct cn_private	*cn;
+#endif
 };
 
 struct ve_devmnt {


More information about the Devel mailing list