[Devel] sysfs: don't use VE namespace for "dev/char" directory

Submitted by Stanislav Kinsburskiy on Sept. 12, 2017, 4:12 p.m.

Details

Message ID 20170912161227.17612.11428.stgit@localhost.localdomain
State New
Series "sysfs: don't use VE namespace for "dev/char" directory"
Headers show

Commit Message

Stanislav Kinsburskiy Sept. 12, 2017, 4:12 p.m.
Looks like we don't have devices, using it. Or lost some patches.
Anyway, currently it doesn't work. To make this VE namespace work, "namespace"
callback has to be added to ve_kobj_type. And this callback has to get VE
structure from kobject somehow. IOW, device has to be allocated per-ve.
Another issue here is that it's unclear, how to mark generic devices as
allocated in VE#0 thus making them visible in VE#0.
Looks like the whole idea was wrong...

https://jira.sw.ru/browse/PSBM-71811

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 drivers/base/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 80cf3eb..86540d9 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1538,7 +1538,7 @@  int __init devices_init(void)
 	sysfs_dev_block_kobj = kobject_create_and_add("block", dev_kobj);
 	if (!sysfs_dev_block_kobj)
 		goto block_kobj_err;
-	sysfs_dev_char_kobj = kobject_create_and_add_ve("char", dev_kobj);
+	sysfs_dev_char_kobj = kobject_create_and_add("char", dev_kobj);
 	if (!sysfs_dev_char_kobj)
 		goto char_kobj_err;
 

Comments

Kirill Tkhai Sept. 13, 2017, 8:21 a.m.
On 12.09.2017 19:12, Stanislav Kinsburskiy wrote:
> Looks like we don't have devices, using it. Or lost some patches.
> Anyway, currently it doesn't work. To make this VE namespace work, "namespace"
> callback has to be added to ve_kobj_type. And this callback has to get VE
> structure from kobject somehow. IOW, device has to be allocated per-ve.
> Another issue here is that it's unclear, how to mark generic devices as
> allocated in VE#0 thus making them visible in VE#0.
> Looks like the whole idea was wrong...
> 
> https://jira.sw.ru/browse/PSBM-71811
> 
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

> ---
>  drivers/base/core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 80cf3eb..86540d9 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1538,7 +1538,7 @@ int __init devices_init(void)
>  	sysfs_dev_block_kobj = kobject_create_and_add("block", dev_kobj);
>  	if (!sysfs_dev_block_kobj)
>  		goto block_kobj_err;
> -	sysfs_dev_char_kobj = kobject_create_and_add_ve("char", dev_kobj);
> +	sysfs_dev_char_kobj = kobject_create_and_add("char", dev_kobj);
>  	if (!sysfs_dev_char_kobj)
>  		goto char_kobj_err;
>  
>