From: Stanislav Kinsburskiy <skinsbur...@virtuozzo.com>

This patch set adds proper support for NFSd service in CT's, based on old
template (like RHEL6).
This patch allows to create NFSd kthreads to a containers pid namespace to
allow to stop the service on old distros (they send kill signals to NFSd
kernel threads).

Signed-off-by: Stanislav Kinsburskiy <skinsbur...@virtuozzo.com>

+++
ve, kthread: Remove some useless crud.

Simplify the code by removing useless macroses.

Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com>

(cherry-picked from vz8 commit 0057a5114524 ("ve/sunrpc/nfsd: containerize
kthreads"))

Signed-off-by: Nikita Yushchenko <nikita.yushche...@virtuozzo.com>
---
 net/sunrpc/svc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 0de918cb3d90..bf0eedd21974 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/kthread.h>
 #include <linux/slab.h>
+#include <linux/ve.h>
 
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/xdr.h>
@@ -727,8 +728,10 @@ svc_start_kthreads(struct svc_serv *serv, struct svc_pool 
*pool, int nrservs)
                        return PTR_ERR(rqstp);
 
                __module_get(serv->sv_ops->svo_module);
-               task = kthread_create_on_node(serv->sv_ops->svo_function, rqstp,
-                                             node, "%s", serv->sv_name);
+               task = kthread_create_on_node_ve_flags(get_exec_env(), 0,
+                                                serv->sv_ops->svo_function,
+                                                rqstp, node,
+                                                "%s", serv->sv_name);
                if (IS_ERR(task)) {
                        module_put(serv->sv_ops->svo_module);
                        svc_exit_thread(rqstp);
-- 
2.30.2

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to