[Devel] Fwd: Why real device can't move to container when sysfs is enabled?
贺鹏
xnhp0320 at gmail.com
Fri Jun 18 01:56:45 PDT 2010
---------- Forwarded message ----------
From: 贺鹏 <xnhp0320 at gmail.com>
Date: 2010/6/18
Subject: Fwd: Why real device can't move to container when sysfs is enabled?
To: user <user at openvz.org>, devel <devel at openvz.org>
---------- Forwarded message ----------
From: 贺鹏 <xnhp0320 at gmail.com>
Date: 2010/6/18
Subject: Why real device can't move to container when sysfs is enabled?
To: Devel at openvz.org
Cc: User at openvz.org
I'm using the openvz kernel 2.6.32, and found that I can't netdev_add
a real net device to a container.
I found the function __dev_change_net_namespace in net/core/dev.c, and it says:
#ifdef CONFIG_SYSFS
/* Don't allow real devices to be moved when sysfs
* is enabled.
*/
err = -EINVAL;
if (dev->dev.parent)
goto out;
#endif
It seems if you enable CONFIG_SYSFS, you can't add a real device to a
container with the netdev_add command.
I'm confused about this, because under kernel 2.6.18, it's ok to add a
real device when sysfs is enabled.
Why forbid this?
and if I want to add a net device, How?
--
hepeng
ICT
--
hepeng
ICT
--
hepeng
ICT
More information about the Devel
mailing list