Disable overlayfs features not used by Docker (#2773)

Currently `CONFIG_OVERLAY_FS_METACOPY` and
`CONFIG_OVERLAY_FS_REDIRECT_DIR` kernel options are enabled but not
preferred by Docker. The metadata copy feature is disabled by default,
and also not actively used by the overlayfs2 driver (see
2c3d1f7b4b).
So the metadata copy config is not really problematic per se. However,
it enables the redirect_dir feature. And a kernel which has the
redirect_dir feature compiled in also enables it by default. This
actually makes the overlayfs2 driver to fallback to naive diff, which
is, from what I understand, slower than the overlayfs native diff (see
also
49c3a7c4ba).
The Docker daemon is also reporting this on startup:

  Not using native diff for overlay2, this may cause degraded performance
  for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled

Currently `CONFIG_OVERLAY_FS_METACOPY` is enabled, and it also enables
`CONFIG_OVERLAY_FS_REDIRECT_DIR`. There was already a previous attempt
to disable the latter (see #2067).

Disable both configs explicitly until Docker is able to use them.
This commit is contained in:
Stefan Agner 2023-09-26 14:54:01 +02:00 committed by GitHub
parent dd21a73031
commit 39e867c352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,8 @@ CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_OVERLAY_FS=y
CONFIG_OVERLAY_FS_METACOPY=y
# CONFIG_OVERLAY_FS_METACOPY is not set
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_GCM=m