]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.6.5/ovl-warn-instead-of-error-if-d_type-is-not-supported.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.6.5 / ovl-warn-instead-of-error-if-d_type-is-not-supported.patch
CommitLineData
be809686
GKH
1From e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 Mon Sep 17 00:00:00 2001
2From: Vivek Goyal <vgoyal@redhat.com>
3Date: Fri, 1 Jul 2016 10:02:44 -0400
4Subject: ovl: warn instead of error if d_type is not supported
5
6From: Vivek Goyal <vgoyal@redhat.com>
7
8commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 upstream.
9
10overlay needs underlying fs to support d_type. Recently I put in a
11patch in to detect this condition and started failing mount if
12underlying fs did not support d_type.
13
14But this breaks existing configurations over kernel upgrade. Those who
15are running docker (partially broken configuration) with xfs not
16supporting d_type, are surprised that after kernel upgrade docker does
17not run anymore.
18
19https://github.com/docker/docker/issues/22937#issuecomment-229881315
20
21So instead of erroring out, detect broken configuration and warn
22about it. This should allow existing docker setups to continue
23working after kernel upgrade.
24
25Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
26Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
27Fixes: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type")
28Signed-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