Skip to content

Commit e7c0b59

Browse files
rhvgoyalMiklos Szeredi
authored andcommitted
ovl: warn instead of error if d_type is not supported
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. moby/moby#22937 (comment) 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: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Fixes: 45aebea ("ovl: Ensure upper filesystem supports d_type") Cc: <stable@vger.kernel.org> 4.6
1 parent 03bea60 commit e7c0b59

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fs/overlayfs/super.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,11 +1082,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
10821082
if (err < 0)
10831083
goto out_put_workdir;
10841084

1085-
if (!err) {
1086-
pr_err("overlayfs: upper fs needs to support d_type.\n");
1087-
err = -EINVAL;
1088-
goto out_put_workdir;
1089-
}
1085+
/*
1086+
* We allowed this configuration and don't want to
1087+
* break users over kernel upgrade. So warn instead
1088+
* of erroring out.
1089+
*/
1090+
if (!err)
1091+
pr_warn("overlayfs: upper fs needs to support d_type.\n");
10901092
}
10911093
}
10921094

0 commit comments

Comments
 (0)