[Devel] [PATCH RH9 10/14] configs: Set overlayfs nfs_export option to true

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Mon Oct 4 12:17:25 MSK 2021


From: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>

+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 at virtuozzo.com>

(cherry picked from vz8 commit 7fe31a28bad084949cd927fbce553d9152631e15)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_INDEX      | 1 +
 redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_NFS_EXPORT | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_INDEX
 create mode 100644 redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_NFS_EXPORT

diff --git a/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_INDEX b/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_INDEX
new file mode 100644
index 0000000..c61cab2
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_INDEX
@@ -0,0 +1 @@
+CONFIG_OVERLAY_FS_INDEX=y
diff --git a/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_NFS_EXPORT b/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_NFS_EXPORT
new file mode 100644
index 0000000..a3fcd011
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/CONFIG_OVERLAY_FS_NFS_EXPORT
@@ -0,0 +1 @@
+CONFIG_OVERLAY_FS_NFS_EXPORT=y
-- 
1.8.3.1



More information about the Devel mailing list