linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org
Subject: [PATCH 4/7] ovl: disable redirect_dir and index when no xattr support
Date: Tue, 17 Oct 2017 18:23:50 +0300	[thread overview]
Message-ID: <1508253833-9866-5-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1508253833-9866-1-git-send-email-amir73il@gmail.com>

Overlayfs falls back to index=off if lower/upper fs does not support
file handles. We should do the same if upper fs does not support xattr.

The redirect_dir feature is implicitly disabled when upper fs does not
support xattr via the check in ovl_redirect_dir(). Make the feature
explicitly disabled in this case by emitting a warning at mount time
and setting redirect_dir to off so its true state is visible in
/proc/mounts.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 fs/overlayfs/super.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index e2ff17d5022b..a908f4f2e7c3 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1009,7 +1009,9 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
 					      "0", 1, 0);
 			if (err) {
 				ufs->noxattr = true;
-				pr_warn("overlayfs: upper fs does not support xattr.\n");
+				ufs->config.redirect_dir = false;
+				ufs->config.index = false;
+				pr_warn("overlayfs: upper fs does not support xattr, falling back to redirect_dir=off, index=off and no opaque dir.\n");
 			} else {
 				vfs_removexattr(ufs->workdir, OVL_XATTR_OPAQUE);
 			}
-- 
2.7.4

  parent reply	other threads:[~2017-10-17 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 15:23 [PATCH 0/7] Implement overlayfs verify_dir mount option Amir Goldstein
2017-10-17 15:23 ` [PATCH 1/7] ovl: fix rmdir problem on origin dir Amir Goldstein
2017-10-31 12:54   ` Miklos Szeredi
2017-10-17 15:23 ` [PATCH 2/7] ovl: no direct iteration for dir with copy up origin Amir Goldstein
2017-10-31 13:08   ` Miklos Szeredi
2017-10-17 15:23 ` [PATCH 3/7] ovl: remove unneeded arg from ovl_verify_origin() Amir Goldstein
2017-10-17 15:23 ` Amir Goldstein [this message]
2017-10-17 15:23 ` [PATCH 5/7] ovl: ignore redirect_dir and index when no upper layer Amir Goldstein
2017-10-17 15:23 ` [PATCH 6/7] ovl: add support for verify_dir mount option Amir Goldstein
2017-10-17 15:23 ` [PATCH 7/7] ovl: follow decoded origin file handle of merge dir Amir Goldstein

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=1508253833-9866-5-git-send-email-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).