[RHEL7] configs: set overlayfs nfs_export option to true

Submitted by Valeriy Vdovin on July 21, 2020, 4:57 p.m.

Details

Message ID 1595350637-674611-1-git-send-email-valeriy.vdovin@virtuozzo.com
State New
Series "configs: set overlayfs nfs_export option to true"
Headers show

Commit Message

Valeriy Vdovin July 21, 2020, 4:57 p.m.
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y

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

Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
---
 configs/kernel-3.10.0-x86_64-debug-minimal.config | 3 ++-
 configs/kernel-3.10.0-x86_64-debug.config         | 3 ++-
 configs/kernel-3.10.0-x86_64-minimal.config       | 3 ++-
 configs/kernel-3.10.0-x86_64.config               | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configs/kernel-3.10.0-x86_64-debug-minimal.config b/configs/kernel-3.10.0-x86_64-debug-minimal.config
index bb9e9bf..b7fc849 100644
--- a/configs/kernel-3.10.0-x86_64-debug-minimal.config
+++ b/configs/kernel-3.10.0-x86_64-debug-minimal.config
@@ -3791,7 +3791,8 @@  CONFIG_FUSE_KIO_DEBUG=y
 CONFIG_OVERLAY_FS=y
 # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
 CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
-# CONFIG_OVERLAY_FS_INDEX is not set
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
 # CONFIG_OVERLAY_FS_XINO_AUTO is not set
 CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
 CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
index d855033..f1f83f6 100644
--- a/configs/kernel-3.10.0-x86_64-debug.config
+++ b/configs/kernel-3.10.0-x86_64-debug.config
@@ -5783,7 +5783,8 @@  CONFIG_CUSE=m
 CONFIG_OVERLAY_FS=m
 # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
 # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
-# CONFIG_OVERLAY_FS_INDEX is not set
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
 # CONFIG_OVERLAY_FS_XINO_AUTO is not set
 CONFIG_GENERIC_ACL=y
 
diff --git a/configs/kernel-3.10.0-x86_64-minimal.config b/configs/kernel-3.10.0-x86_64-minimal.config
index 2590c72..8dc256b 100644
--- a/configs/kernel-3.10.0-x86_64-minimal.config
+++ b/configs/kernel-3.10.0-x86_64-minimal.config
@@ -3792,7 +3792,8 @@  CONFIG_FUSE_KIO_PCS=y
 CONFIG_OVERLAY_FS=y
 # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
 CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
-# CONFIG_OVERLAY_FS_INDEX is not set
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
 # CONFIG_OVERLAY_FS_XINO_AUTO is not set
 CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
 CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
diff --git a/configs/kernel-3.10.0-x86_64.config b/configs/kernel-3.10.0-x86_64.config
index c1bc94e..8e285b0 100644
--- a/configs/kernel-3.10.0-x86_64.config
+++ b/configs/kernel-3.10.0-x86_64.config
@@ -5782,7 +5782,8 @@  CONFIG_CUSE=m
 CONFIG_OVERLAY_FS=m
 # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
 # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
-# CONFIG_OVERLAY_FS_INDEX is not set
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
 # CONFIG_OVERLAY_FS_XINO_AUTO is not set
 CONFIG_GENERIC_ACL=y
 

Comments

Vasily Averin July 22, 2020, 5:30 a.m.
Kostja, Den,
could you please confirm,
are we going to enable config options disabled in original RHEL7?
It is tricky, because Red Hat did not tested it, 
its code can be broken right now or can get broken after following major updates.
Are we going to prepare and run some special tests for overlayfs?

Also, I would like to see any explanation why it is required,
bug explain nothing.

Thank you,
	Vasily Averin

On 7/21/20 7:57 PM, Valeriy Vdovin wrote:
> +CONFIG_OVERLAY_FS_INDEX=y
> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
> 
> https://jira.sw.ru/browse/PSBM-104961
> 
> Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
> ---
>  configs/kernel-3.10.0-x86_64-debug-minimal.config | 3 ++-
>  configs/kernel-3.10.0-x86_64-debug.config         | 3 ++-
>  configs/kernel-3.10.0-x86_64-minimal.config       | 3 ++-
>  configs/kernel-3.10.0-x86_64.config               | 3 ++-
>  4 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/configs/kernel-3.10.0-x86_64-debug-minimal.config b/configs/kernel-3.10.0-x86_64-debug-minimal.config
> index bb9e9bf..b7fc849 100644
> --- a/configs/kernel-3.10.0-x86_64-debug-minimal.config
> +++ b/configs/kernel-3.10.0-x86_64-debug-minimal.config
> @@ -3791,7 +3791,8 @@ CONFIG_FUSE_KIO_DEBUG=y
>  CONFIG_OVERLAY_FS=y
>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>  CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
> -# CONFIG_OVERLAY_FS_INDEX is not set
> +CONFIG_OVERLAY_FS_INDEX=y
> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>  CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
>  CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
> diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
> index d855033..f1f83f6 100644
> --- a/configs/kernel-3.10.0-x86_64-debug.config
> +++ b/configs/kernel-3.10.0-x86_64-debug.config
> @@ -5783,7 +5783,8 @@ CONFIG_CUSE=m
>  CONFIG_OVERLAY_FS=m
>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>  # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
> -# CONFIG_OVERLAY_FS_INDEX is not set
> +CONFIG_OVERLAY_FS_INDEX=y
> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>  CONFIG_GENERIC_ACL=y
>  
> diff --git a/configs/kernel-3.10.0-x86_64-minimal.config b/configs/kernel-3.10.0-x86_64-minimal.config
> index 2590c72..8dc256b 100644
> --- a/configs/kernel-3.10.0-x86_64-minimal.config
> +++ b/configs/kernel-3.10.0-x86_64-minimal.config
> @@ -3792,7 +3792,8 @@ CONFIG_FUSE_KIO_PCS=y
>  CONFIG_OVERLAY_FS=y
>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>  CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
> -# CONFIG_OVERLAY_FS_INDEX is not set
> +CONFIG_OVERLAY_FS_INDEX=y
> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>  CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
>  CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
> diff --git a/configs/kernel-3.10.0-x86_64.config b/configs/kernel-3.10.0-x86_64.config
> index c1bc94e..8e285b0 100644
> --- a/configs/kernel-3.10.0-x86_64.config
> +++ b/configs/kernel-3.10.0-x86_64.config
> @@ -5782,7 +5782,8 @@ CONFIG_CUSE=m
>  CONFIG_OVERLAY_FS=m
>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>  # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
> -# CONFIG_OVERLAY_FS_INDEX is not set
> +CONFIG_OVERLAY_FS_INDEX=y
> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>  CONFIG_GENERIC_ACL=y
>  
>
Valeriy Vdovin July 22, 2020, 7:53 a.m.
Vasiliy, good morning.
Indeed, I did not provide explanation of why this patch is required.
I've covered this on the meeting and Den told me in public that I'm good to go.
When I was thinking of how to prepare the patch I've typed git log configs and
checked out how others perform config changes and did the same thing.

Here is the actual description:
Docker uses overlayfs. Lately, I've been testing checkpoint/restore of fs notifications
that were setup on top of overlayfs. I've found out that criu is not able to dump
opened file descriptors of fanotify when nfs_export parameter is off.
The details of that problem:
at checkpoint/dump criu wants to dump fanotify fd and uses 'open_by_handle_at' with fhandle
of the subject descriptor. Kernel needs to decode fhandle to convert it to inode, for that it
uses mnt->mnt_sb->s_export_op->fh_to_dentry
For overlayfs mount s_export_op is only filled with valid exportfs function if nfs_export flag is true.
nfs_export in its turn depends on index=on option.

One way to enable them is to extend mount options  with string "nfs_export=on,index=on" during
call to mount. Another way which we discussed - is to tune defaults for both values to true.

Should I copy this description to commit message?
Vasily Averin July 23, 2020, 11:04 a.m.
Valeriy,

I afraid your patch seriously changes current overlayfs.
Right now we have no special tests for overlayfs because it is (or at least should be) crefully tested by Red Hat.
After your change we can get broken overlayfs in any time -- because Red Hat does not worry about functionality disabled in their configs.

That's why I'm ask khorenko@ and den@ -- are we ready to get this risk? are we going to prepare and run some overlayfs tests?
I did not found any related subtasks, and afraid nobody even think about this problem.

Thank you,
	Vasily Averin

On 7/22/20 10:53 AM, Valeriy Vdovin wrote:
> Vasiliy, good morning.
> Indeed, I did not provide explanation of why this patch is required.
> I've covered this on the meeting and Den told me in public that I'm good to go.
> When I was thinking of how to prepare the patch I've typed git log configs and
> checked out how others perform config changes and did the same thing.
> 
> Here is the actual description:
> Docker uses overlayfs. Lately, I've been testing checkpoint/restore of fs notifications
> that were setup on top of overlayfs. I've found out that criu is not able to dump
> opened file descriptors of fanotify when nfs_export parameter is off.
> The details of that problem:
> at checkpoint/dump criu wants to dump fanotify fd and uses 'open_by_handle_at' with fhandle
> of the subject descriptor. Kernel needs to decode fhandle to convert it to inode, for that it
> uses mnt->mnt_sb->s_export_op->fh_to_dentry
> For overlayfs mount s_export_op is only filled with valid exportfs function if nfs_export flag is true.
> nfs_export in its turn depends on index=on option.
> 
> One way to enable them is to extend mount options  with string "nfs_export=on,index=on" during
> call to mount. Another way which we discussed - is to tune defaults for both values to true.
> 
> Should I copy this description to commit message?
> 
> 
> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Vasiliy Averin <vvs@virtuozzo.com>
> *Sent:* Wednesday, July 22, 2020 8:30 AM
> *To:* Konstantin Khorenko <khorenko@virtuozzo.com>; Denis Lunev <den@virtuozzo.com>
> *Cc:* Valeriy Vdovin <Valeriy.Vdovin@virtuozzo.com>; devel@openvz.org <devel@openvz.org>
> *Subject:* Re: [PATCH RHEL7] configs: set overlayfs nfs_export option to true
>  
> Kostja, Den,
> could you please confirm,
> are we going to enable config options disabled in original RHEL7?
> It is tricky, because Red Hat did not tested it,
> its code can be broken right now or can get broken after following major updates.
> Are we going to prepare and run some special tests for overlayfs?
> 
> Also, I would like to see any explanation why it is required,
> bug explain nothing.
> 
> Thank you,
>         Vasily Averin
> 
> On 7/21/20 7:57 PM, Valeriy Vdovin wrote:
>> +CONFIG_OVERLAY_FS_INDEX=y
>> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>> 
>> https://jira.sw.ru/browse/PSBM-104961
>> 
>> Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
>> ---
>>  configs/kernel-3.10.0-x86_64-debug-minimal.config | 3 ++-
>>  configs/kernel-3.10.0-x86_64-debug.config         | 3 ++-
>>  configs/kernel-3.10.0-x86_64-minimal.config       | 3 ++-
>>  configs/kernel-3.10.0-x86_64.config               | 3 ++-
>>  4 files changed, 8 insertions(+), 4 deletions(-)
>> 
>> diff --git a/configs/kernel-3.10.0-x86_64-debug-minimal.config b/configs/kernel-3.10.0-x86_64-debug-minimal.config
>> index bb9e9bf..b7fc849 100644
>> --- a/configs/kernel-3.10.0-x86_64-debug-minimal.config
>> +++ b/configs/kernel-3.10.0-x86_64-debug-minimal.config
>> @@ -3791,7 +3791,8 @@ CONFIG_FUSE_KIO_DEBUG=y
>>  CONFIG_OVERLAY_FS=y
>>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>>  CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
>> -# CONFIG_OVERLAY_FS_INDEX is not set
>> +CONFIG_OVERLAY_FS_INDEX=y
>> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>>  CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
>>  CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
>> diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
>> index d855033..f1f83f6 100644
>> --- a/configs/kernel-3.10.0-x86_64-debug.config
>> +++ b/configs/kernel-3.10.0-x86_64-debug.config
>> @@ -5783,7 +5783,8 @@ CONFIG_CUSE=m
>>  CONFIG_OVERLAY_FS=m
>>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>>  # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
>> -# CONFIG_OVERLAY_FS_INDEX is not set
>> +CONFIG_OVERLAY_FS_INDEX=y
>> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>>  CONFIG_GENERIC_ACL=y
>>  
>> diff --git a/configs/kernel-3.10.0-x86_64-minimal.config b/configs/kernel-3.10.0-x86_64-minimal.config
>> index 2590c72..8dc256b 100644
>> --- a/configs/kernel-3.10.0-x86_64-minimal.config
>> +++ b/configs/kernel-3.10.0-x86_64-minimal.config
>> @@ -3792,7 +3792,8 @@ CONFIG_FUSE_KIO_PCS=y
>>  CONFIG_OVERLAY_FS=y
>>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>>  CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
>> -# CONFIG_OVERLAY_FS_INDEX is not set
>> +CONFIG_OVERLAY_FS_INDEX=y
>> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>>  CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
>>  CONFIG_OVERLAY_FS_PATH_OPTIONS_MNT_ID=y
>> diff --git a/configs/kernel-3.10.0-x86_64.config b/configs/kernel-3.10.0-x86_64.config
>> index c1bc94e..8e285b0 100644
>> --- a/configs/kernel-3.10.0-x86_64.config
>> +++ b/configs/kernel-3.10.0-x86_64.config
>> @@ -5782,7 +5782,8 @@ CONFIG_CUSE=m
>>  CONFIG_OVERLAY_FS=m
>>  # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
>>  # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
>> -# CONFIG_OVERLAY_FS_INDEX is not set
>> +CONFIG_OVERLAY_FS_INDEX=y
>> +CONFIG_OVERLAY_FS_NFS_EXPORT=y
>>  # CONFIG_OVERLAY_FS_XINO_AUTO is not set
>>  CONFIG_GENERIC_ACL=y
>>  
>>