[Devel] [PATCH vz9 13/14] sunrpc: do not place task to sleep if has to be killed

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy There might be a situation, when task is expected to be killed, but it's execution already passed this check in __rpc_execute() and the task is not yet sleeping. In this case it will fall into sleep. I.e. it's a race. This patch add check for per-net "kill_tasks" is en

[Devel] [PATCH vz9 00/14] First 14 patches from part 9

2021-09-27 Thread Nikita Yushchenko
The remaining part of part9 will be sent later, after dependency 've/printk: per-CT printk helpers introduced' gets in. Stanislav Kinsburskiy (14): ve/kthreadd: emulate kthreadd by kworker thread, attached to CT ve/kthreadd: add per-ve kthreads creation interface ve/kthreadd: create kthreadd

[Devel] [PATCH vz9 04/14] ve/umh: make queue function one of the subprocess_info parameters

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy This will allow to use a different one for containers. Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 commit 041bcd5475d5 ("ve/umh: make queue function one of the subprocess_info parameters")) Signed-off-by: Nikita Yushchenko --- include/linux/umh.h

[Devel] [PATCH vz9 12/14] sunrpc: pending tasks kill helper added

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy This patch aborts SUNRPC tasks upon raise of per-net "kill_tasks" toggle. This is needed to abort pernding tasks, which are waiting for timeout. There could be a situation, when RPC task is not yet sleeping, but already passed the check for "kill_tasks" in __rpc_execu

[Devel] [PATCH vz9 02/14] ve/kthreadd: add per-ve kthreads creation interface

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy Patch introduces new function kthread_create_on_node_ve_flags and a few helpers: 1) kthread_create_on_node_ve and 1) kthread_run_ve and 2) kthread_create_ve Note: we need to able to provide fork flags to kthread creation to be able to fork one kthread from another as

[Devel] [PATCH vz9 11/14] sunrpc: bring back SUNRPC task abort logic

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy We had this logic in vz6. But it was applied to any stop there. The intention was to solve 2 tasks: 1) allow to stop container when network is unaccessible 2) allow to suspend container with blocked network traffic. In vz7 we need the traffic to flow on suspend. Thus

[Devel] [PATCH vz9 08/14] ve/umh: create kernel thread for each synchronious UMH request

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy So, rationale... UHM request is just a work, attached to some queue, which is handled by per-cpu kernel threads (this is a simple explanation, but true in general). We want to execute this work in container environment because: 1) we need to set container root to exec

[Devel] [PATCH vz9 14/14] ve/fs/nfs: NFS containerization

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy Does: 1) virtualize rpc_pipefs file system 2) virtualize nfs file system 3) allows to mount from CTs initial user ns 4) add VE_FEATURE_NFS check during nfsd mount Signed-off-by: Stanislav Kinsbursky +++ ve/fs/nfs: NFS containerization - allow to mount NFS in CT root

[Devel] [PATCH vz9 06/14] ve/umh: add per-container usermodehelper thread

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy Signed-off-by: Stanislav Kinsburskiy +++ ve, kthread: Remove some useless crud. Simplify the code by removing useless macroses. Signed-off-by: Andrey Ryabinin (cherry-picked from vz8 commit 890476830003 ("ve/umh: add per-container usermodehelper thread")) Signed

[Devel] [PATCH vz9 10/14] sunrpc: add "kill-tasks" proc entry

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy Boolean per-net SUNPRC proc entry. Will be used to abort SUNRPC traffic when necessary. https://jira.sw.ru/browse/PSBM-66510 Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 commit 22ca0165a75b ("sunrpc: add "kill-tasks" proc entry")) Follow file_opera

[Devel] [PATCH vz9 05/14] ve/umh: init work separately from other subprocess_info parameters

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy By default UHM requests are handled by a workqueue, i.e. they need "struct work" parameter. It will be different in containers, so move this work init and usage out of generic subprocess handling code. Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 com

[Devel] [PATCH vz9 01/14] ve/kthreadd: emulate kthreadd by kworker thread, attached to CT

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy This is the first version of kthreadd in a container (there will some improvements on top). With this patch kthreadd won't be visible in a container, but its children will be. Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 commit 1cc3a639c3fb ("ve/kthr

[Devel] [PATCH vz9 03/14] ve/kthreadd: create kthreadd in a containers pid ns

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy The idea is simple: create another kworker in the one, attached to CT. The latter has containers pid ns for children, so the former will appear in containers pid ns. The latter then can be destroyed, thus leaving us "kthreadd" kernel thread not just attached, but also

[Devel] [PATCH vz9 09/14] ve/umh: enable user mode helper in container

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 commit 27d2bf69ee2a ("ve/umh: enable user mode helper in container")) Signed-off-by: Nikita Yushchenko --- kernel/umh.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/umh.c b/kernel/umh.c i

[Devel] [PATCH vz9 07/14] ve/umh: introduce per-container user mode helper macroses and functions

2021-09-27 Thread Nikita Yushchenko
From: Stanislav Kinsburskiy The main and only difference with generic usermode helper is that subprocess_info is queued via additional kthread_work member to per-container usermode helper worker. Signed-off-by: Stanislav Kinsburskiy (cherry-picked from vz8 commit 871dd2e11512 ("ve/umh: introdu

Re: [Devel] [PATCH vz9 14/14] ve/fs/nfs: NFS containerization

2021-09-27 Thread Pavel Tikhomirov
Can we also fixup/merge 2e319b6173a1 ("ve/sunrpc: Enable rpc_pipefs mounts in Container root user namespace") commit from vz8 to this patch? On 27.09.2021 09:30, Nikita Yushchenko wrote: From: Stanislav Kinsburskiy Does: 1) virtualize rpc_pipefs file system 2) virtualize nfs file system 3) al

Re: [Devel] [PATCH vz9 14/14] ve/fs/nfs: NFS containerization

2021-09-27 Thread Pavel Tikhomirov
And also it looks like you miss in your gitconfig [sendemail] suppresscc = all else you send patches to everybody mentioned in patch, which probably not what you want. ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/

Re: [Devel] [PATCH vz9 14/14] ve/fs/nfs: NFS containerization

2021-09-27 Thread Nikita Yushchenko
27.09.2021 10:23, Pavel Tikhomirov wrote: Can we also fixup/merge 2e319b6173a1 ("ve/sunrpc: Enable rpc_pipefs mounts in Container root user namespace") commit from vz8 to this patch? I guess that "ve/sunrpc: Enable rpc_pipefs mounts in Container root user namespace' depends on it's predecessor

Re: [Devel] [PATCH vz9 14/14] ve/fs/nfs: NFS containerization

2021-09-27 Thread Pavel Tikhomirov
On 27.09.2021 11:05, Nikita Yushchenko wrote: 27.09.2021 10:23, Pavel Tikhomirov wrote: Can we also fixup/merge 2e319b6173a1 ("ve/sunrpc: Enable rpc_pipefs mounts in Container root user namespace") commit from vz8 to this patch? I guess that "ve/sunrpc: Enable rpc_pipefs mounts in Container

Re: [Devel] [PATCH rh7] ploop: Fix partition refcounter leak

2021-09-27 Thread Kirill Tkhai
On 23.09.2021 15:49, Konstantin Khorenko wrote: > ms commit b7d6c3033323 ("block: fix use-after-free on cached > last_lookup partition") has changed the semantic of > disk_map_sector_rcu() function: previously it only returned appropriate > partition but after the patch it additionally gets a refco

[Devel] [PATCH RH9] push_backup: Do not take write lock on statistics

2021-09-27 Thread Kirill Tkhai
It's overkill. Signed-off-by: Kirill Tkhai --- drivers/md/dm-push-backup.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c index 16e8cf27211f..75f080fe34cf 100644 --- a/drivers/md/dm-push-backup.c +++ b/drivers/md