[Devel] [PATCH v2 02/27] connector: store all private data on VE structure
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Aug 17 16:59:12 MSK 2017
This is needed to containerize connector and its proc part.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky 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