]>
Commit | Line | Data |
---|---|---|
be809686 GKH |
1 | From e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 Mon Sep 17 00:00:00 2001 |
2 | From: Vivek Goyal <vgoyal@redhat.com> | |
3 | Date: Fri, 1 Jul 2016 10:02:44 -0400 | |
4 | Subject: ovl: warn instead of error if d_type is not supported | |
5 | ||
6 | From: Vivek Goyal <vgoyal@redhat.com> | |
7 | ||
8 | commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 upstream. | |
9 | ||
10 | overlay needs underlying fs to support d_type. Recently I put in a | |
11 | patch in to detect this condition and started failing mount if | |
12 | underlying fs did not support d_type. | |
13 | ||
14 | But this breaks existing configurations over kernel upgrade. Those who | |
15 | are running docker (partially broken configuration) with xfs not | |
16 | supporting d_type, are surprised that after kernel upgrade docker does | |
17 | not run anymore. | |
18 | ||
19 | https://github.com/docker/docker/issues/22937#issuecomment-229881315 | |
20 | ||
21 | So instead of erroring out, detect broken configuration and warn | |
22 | about it. This should allow existing docker setups to continue | |
23 | working after kernel upgrade. | |
24 | ||
25 | Signed-off-by: Vivek Goyal <vgoyal@redhat.com> | |
26 | Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> | |
27 | Fixes: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type") | |
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
29 | ||
30 | --- | |
31 | fs/overlayfs/super.c | 12 +++++++----- | |
32 | 1 file changed, 7 insertions(+), 5 deletions(-) | |
33 | ||
34 | --- a/fs/overlayfs/super.c | |
35 | +++ b/fs/overlayfs/super.c | |
36 | @@ -1072,11 +1072,13 @@ static int ovl_fill_super(struct super_b | |
37 | if (err < 0) | |
38 | goto out_put_workdir; | |
39 | ||
40 | - if (!err) { | |
41 | - pr_err("overlayfs: upper fs needs to support d_type.\n"); | |
42 | - err = -EINVAL; | |
43 | - goto out_put_workdir; | |
44 | - } | |
45 | + /* | |
46 | + * We allowed this configuration and don't want to | |
47 | + * break users over kernel upgrade. So warn instead | |
48 | + * of erroring out. | |
49 | + */ | |
50 | + if (!err) | |
51 | + pr_warn("overlayfs: upper fs needs to support d_type.\n"); | |
52 | } | |
53 | } | |
54 |