Skip to content

Commit

Permalink
ovl: warn instead of error if d_type is not supported
Browse files Browse the repository at this point in the history
commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 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.

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: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type")
Cc: <stable@vger.kernel.org> 4.6
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
rhvgoyal authored and freak07 committed Sep 3, 2018
1 parent a149952 commit b7e63f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fs/overlayfs/super.c
Expand Up @@ -1066,11 +1066,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
if (err < 0)
goto out_put_workdir;

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

Expand Down

0 comments on commit b7e63f2

Please sign in to comment.