From: Alois Wohlschlager <alwoju@gmx.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ovl: warn if trusted xattr creation fails
Date: Sat, 26 Feb 2022 19:15:50 +0100 [thread overview]
Message-ID: <2619141.9QKAVWPfZp@genesis> (raw)
In-Reply-To: <YhNzc/++SHzdMXyt@miu.piliscsaba.redhat.com>
Am Montag, 21. Februar 2022, 12:11:47 CET schrieb Miklos Szeredi:
>
> Thanks for the patch.
>
> How about the following (untested) variant?
>
> Thanks,
> Miklos
>
>
> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> index 7bb0a47cb615..955aeefc3b29 100644
> --- a/fs/overlayfs/super.c
> +++ b/fs/overlayfs/super.c
> @@ -1413,11 +1413,12 @@ static int ovl_make_workdir(struct super_block *sb,
> struct ovl_fs *ofs, */
> err = ovl_do_setxattr(ofs, ofs->workdir, OVL_XATTR_OPAQUE, "0", 1);
> if (err) {
> + pr_warn("failed to set xattr on upper\n");
> ofs->noxattr = true;
> if (ofs->config.index || ofs->config.metacopy) {
> ofs->config.index = false;
> ofs->config.metacopy = false;
> - pr_warn("upper fs does not support xattr, falling back to
> index=off,metacopy=off.\n"); + pr_warn("...falling back to
> index=off,metacopy=off.\n");
> }
> /*
> * xattr support is required for persistent st_ino.
> @@ -1425,8 +1426,10 @@ static int ovl_make_workdir(struct super_block *sb,
> struct ovl_fs *ofs, */
> if (ofs->config.xino == OVL_XINO_AUTO) {
> ofs->config.xino = OVL_XINO_OFF;
> - pr_warn("upper fs does not support xattr, falling back to xino=off.\n");
> + pr_warn("...falling back to xino=off.\n");
> }
> + if (err == -EPERM && !ofs->config.userxattr)
> + pr_info("try mounting with 'userxattr' option\n");
> err = 0;
> } else {
> ovl_do_removexattr(ofs, ofs->workdir, OVL_XATTR_OPAQUE);
Seems sensible to me, since it doesn't duplicate information in case index, metacopy or xino are attempted to be used.
Alois
prev parent reply other threads:[~2022-02-26 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 11:02 [PATCH] ovl: warn if trusted xattr creation fails Alois Wohlschlager
2022-02-21 11:11 ` Miklos Szeredi
2022-02-26 18:15 ` Alois Wohlschlager [this message]
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=2619141.9QKAVWPfZp@genesis \
--to=alwoju@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--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).