stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZ Lin (林上智)" <sz.lin@moxa.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, "Vivek Goyal" <vgoyal@redhat.com>,
	"Miklos Szeredi" <mszeredi@redhat.com>,
	"SZ Lin (林上智)" <sz.lin@moxa.com>
Subject: request for 4.4-stable: e7c0b5991dd1b ("ovl: warn instead of error if d_type is not supported")
Date: Thu, 23 Aug 2018 18:23:12 +0800	[thread overview]
Message-ID: <20180823102312.GB10325@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

Hi Greg,

This patch is not marked for 4.4-stable, but it's already in 4.9 and 4.14 stable. 

Please apply to 4.4-stable.

This patch turned the status from error to warning if d_type is not supported,
and thus operation won't be interrupted.

-- 
SZ Lin (林上智)

[-- Attachment #2: 0001-ovl-warn-instead-of-error-if-d_type-is-not-supported.patch --]
[-- Type: text/x-diff, Size: 1925 bytes --]

>From c80b678619de761d0c2060090fc00b3b32385476 Mon Sep 17 00:00:00 2001
From: Vivek Goyal <vgoyal@redhat.com>
Date: Fri, 1 Jul 2016 10:02:44 -0400
Subject: [PATCH] ovl: warn instead of error if d_type is not supported

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.

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: 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>
---
 fs/overlayfs/super.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index fd21c5f74fba..0035cb80ecd1 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -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");
 		}
 	}
 
-- 
2.18.0


                 reply	other threads:[~2018-08-23 13:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180823102312.GB10325@localhost \
    --to=sz.lin@moxa.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=mszeredi@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).