[Devel,vz7] modules: allow NFS modules autoload in containers

Submitted by Stanislav Kinsburskiy on Dec. 28, 2016, 1:37 p.m.

Details

Message ID 20161228133730.26168.74732.stgit@localhost.localdomain
State New
Series "modules: allow NFS modules autoload in containers"
Headers show

Commit Message

Stanislav Kinsburskiy Dec. 28, 2016, 1:37 p.m.
Otherwise migration can fail

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

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 kernel/kmod.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/kernel/kmod.c b/kernel/kmod.c
index 63748d4..5253cae 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -422,6 +422,10 @@  static const char * const ve0_allowed_mod[] = {
 
 	"rtnl-link-dummy",
 	"rtnl-link-vxlan",
+
+	/* NFS */
+	"nfsv3",
+	"nfsv4",
 };
 
 /*

Comments

Dmitry Safonov Dec. 28, 2016, 1:49 p.m.
On 12/28/2016 04:37 PM, Stanislav Kinsburskiy wrote:
> Otherwise migration can fail
>
> https://jira.sw.ru/browse/PSBM-58178
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>

Just for check - these modules should be loaded on sys_mount()?
In this case it should be prefixed with 'fs-'.
Look: do_new_mount() calls get_fs_type() which does request_module():
 >	if (!fs && (request_module("fs-%.*s", len, name) == 0))

Otherwise, it will fail to autoload these modules on mount().
So, what is the expected call-path for autoloading nfs modules?

> ---
>  kernel/kmod.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/kernel/kmod.c b/kernel/kmod.c
> index 63748d4..5253cae 100644
> --- a/kernel/kmod.c
> +++ b/kernel/kmod.c
> @@ -422,6 +422,10 @@ static const char * const ve0_allowed_mod[] = {
>
>  	"rtnl-link-dummy",
>  	"rtnl-link-vxlan",
> +
> +	/* NFS */
> +	"nfsv3",
> +	"nfsv4",
>  };
>
>  /*
>
Dmitry Safonov Dec. 28, 2016, 3:30 p.m.
On 12/28/2016 06:31 PM, Stanislav Kinsburskiy wrote:
>
>
> 28.12.2016 14:49, Dmitry Safonov пишет:
>> On 12/28/2016 04:37 PM, Stanislav Kinsburskiy wrote:
>>> Otherwise migration can fail
>>>
>>> https://jira.sw.ru/browse/PSBM-58178
>>>
>>> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
>>
>> Just for check - these modules should be loaded on sys_mount()?
>> In this case it should be prefixed with 'fs-'.
>> Look: do_new_mount() calls get_fs_type() which does request_module():
>> >    if (!fs && (request_module("fs-%.*s", len, name) == 0))
>>
>> Otherwise, it will fail to autoload these modules on mount().
>> So, what is the expected call-path for autoloading nfs modules?
>>
>
> We shouldn't really care, because modules load is performed by modprobe
> via UMH,
> and looks like modprobe handles these types of module requests properly.
> I tested the patch, it works.

Ok,
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>

>
>>> ---
>>>  kernel/kmod.c |    4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/kernel/kmod.c b/kernel/kmod.c
>>> index 63748d4..5253cae 100644
>>> --- a/kernel/kmod.c
>>> +++ b/kernel/kmod.c
>>> @@ -422,6 +422,10 @@ static const char * const ve0_allowed_mod[] = {
>>>
>>>      "rtnl-link-dummy",
>>>      "rtnl-link-vxlan",
>>> +
>>> +    /* NFS */
>>> +    "nfsv3",
>>> +    "nfsv4",
>>>  };
>>>
>>>  /*
>>>
>>
>
Stanislav Kinsburskiy Dec. 28, 2016, 3:31 p.m.
28.12.2016 14:49, Dmitry Safonov пишет:
> On 12/28/2016 04:37 PM, Stanislav Kinsburskiy wrote:
>> Otherwise migration can fail
>>
>> https://jira.sw.ru/browse/PSBM-58178
>>
>> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
>
> Just for check - these modules should be loaded on sys_mount()?
> In this case it should be prefixed with 'fs-'.
> Look: do_new_mount() calls get_fs_type() which does request_module():
> >    if (!fs && (request_module("fs-%.*s", len, name) == 0))
>
> Otherwise, it will fail to autoload these modules on mount().
> So, what is the expected call-path for autoloading nfs modules?
>

We shouldn't really care, because modules load is performed by modprobe 
via UMH,
and looks like modprobe handles these types of module requests properly.
I tested the patch, it works.

>> ---
>>  kernel/kmod.c |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/kernel/kmod.c b/kernel/kmod.c
>> index 63748d4..5253cae 100644
>> --- a/kernel/kmod.c
>> +++ b/kernel/kmod.c
>> @@ -422,6 +422,10 @@ static const char * const ve0_allowed_mod[] = {
>>
>>      "rtnl-link-dummy",
>>      "rtnl-link-vxlan",
>> +
>> +    /* NFS */
>> +    "nfsv3",
>> +    "nfsv4",
>>  };
>>
>>  /*
>>
>