Commit 3d50c24a authored by Vivek Goyal's avatar Vivek Goyal Committed by Kleber Sacilotto de Souza

ovl: warn instead of error if d_type is not supported

BugLink: https://bugs.launchpad.net/bugs/1792383

commit e7c0b599 upstream.

overlay needs underlying fs to support d_type. Recently I put in a
patch in to detect this condition and started failing mount if
underlying fs did not support d_type.

But this breaks existing configurations over kernel upgrade. Those who
are running docker (partially broken configuration) with xfs not
supporting d_type, are surprised that after kernel upgrade docker does
not run anymore.

https://github.com/docker/docker/issues/22937#issuecomment-229881315

So instead of erroring out, detect broken configuration and warn
about it. This should allow existing docker setups to continue
working after kernel upgrade.
Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Fixes: 45aebeaf ("ovl: Ensure upper filesystem supports d_type")
Cc: <stable@vger.kernel.org> 4.6
Signed-off-by: default avatarSZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e08d6d41
...@@ -1153,11 +1153,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) ...@@ -1153,11 +1153,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
if (err < 0) if (err < 0)
goto out_put_workdir; goto out_put_workdir;
if (!err) { /*
pr_err("overlayfs: upper fs needs to support d_type.\n"); * We allowed this configuration and don't want to
err = -EINVAL; * break users over kernel upgrade. So warn instead
goto out_put_workdir; * of erroring out.
} */
if (!err)
pr_warn("overlayfs: upper fs needs to support d_type.\n");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment