[RHEL8,COMMIT] configs: Set overlayfs nfs_export option to true

Submitted by Konstantin Khorenko on Sept. 23, 2020, 5:14 p.m.

Details

Message ID 202009231714.08NHEq3D332492@finist-co8.sw.ru
State New
Series "configs: set overlayfs nfs_export option to true"
Headers show

Commit Message

Konstantin Khorenko Sept. 23, 2020, 5:14 p.m.
The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.7
------>
commit f8e1f0f833f17767764b2fc2c7e2e4f8cb55d95e
Author: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
Date:   Wed Jul 29 10:13:47 2020 +0300

    configs: Set overlayfs nfs_export option to true
    
    +CONFIG_OVERLAY_FS_INDEX=y
    +CONFIG_OVERLAY_FS_NFS_EXPORT=y
    
    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.
    
    https://jira.sw.ru/browse/PSBM-104961
    
    Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
---
 configs/kernel-4.18.0-x86_64-KVM-minimal.config | 3 ++-
 configs/kernel-4.18.0-x86_64-debug.config       | 3 +++
 configs/kernel-4.18.0-x86_64.config             | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/configs/kernel-4.18.0-x86_64-KVM-minimal.config b/configs/kernel-4.18.0-x86_64-KVM-minimal.config
index 42b7cd818bb6..cb2562cf64f5 100644
--- a/configs/kernel-4.18.0-x86_64-KVM-minimal.config
+++ b/configs/kernel-4.18.0-x86_64-KVM-minimal.config
@@ -4029,7 +4029,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_METACOPY is not set
 CONFIG_OVERLAY_FS_DYNAMIC_RESOLVE_PATH_OPTIONS=y
diff --git a/configs/kernel-4.18.0-x86_64-debug.config b/configs/kernel-4.18.0-x86_64-debug.config
index 5db56c96b8da..9f576da4cff7 100644
--- a/configs/kernel-4.18.0-x86_64-debug.config
+++ b/configs/kernel-4.18.0-x86_64-debug.config
@@ -7730,6 +7730,9 @@  CONFIG_LEGACY_PTY_COUNT=12
 CONFIG_LSM_MMAP_MIN_ADDR=69632
 CONFIG_DEFAULT_MMAP_MIN_ADDR=69632
 
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
+
 CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_ON_OOPS_VALUE=1
 
diff --git a/configs/kernel-4.18.0-x86_64.config b/configs/kernel-4.18.0-x86_64.config
index 90347efc7a93..504b5734aa12 100644
--- a/configs/kernel-4.18.0-x86_64.config
+++ b/configs/kernel-4.18.0-x86_64.config
@@ -7685,6 +7685,9 @@  CONFIG_LEGACY_PTY_COUNT=12
 CONFIG_LSM_MMAP_MIN_ADDR=69632
 CONFIG_DEFAULT_MMAP_MIN_ADDR=69632
 
+CONFIG_OVERLAY_FS_INDEX=y
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
+
 #
 # OpenVZ
 #