]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: automatically enable redirect_dir on metacopy=on
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 1 Nov 2018 20:31:39 +0000 (21:31 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 1 Nov 2018 20:31:39 +0000 (21:31 +0100)
commit2c15a9ddd68e145a681767b5ade18d1002ee3e11
treeae33bdfffaaa6c1e9297d33f39dff2ddee4ddb24
parentc06efebe7d3e38ac83ec3e310e2e27fa38cbb514
ovl: automatically enable redirect_dir on metacopy=on

Current behavior is to automatically disable metacopy if redirect_dir is
not enabled and proceed with the mount.

If "metacopy=on" mount option was given, then this behavior can confuse the
user: no mount failure, yet metacopy is disabled.

This patch makes metacopy=on imply redirect_dir=on.

The converse is also true: turning off full redirect with redirect_dir=
{off|follow|nofollow} will disable metacopy.

If both metacopy=on and redirect_dir={off|follow|nofollow} is specified,
then mount will fail, since there's no way to correctly resolve the
conflict.

Reported-by: Daniel Walsh <dwalsh@redhat.com>
Fixes: 3fe988ea3f8d ("ovl: Provide a mount option metacopy=on/off...")
Cc: <stable@vger.kernel.org> # v4.19
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Documentation/filesystems/overlayfs.txt
fs/overlayfs/super.c