From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
fstests <fstests@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>, Eryu Guan <eguan@redhat.com>,
Miao Xie <miaoxie@huawei.com>,
yangerkun@huawei.com
Subject: Re: [PATCH v3 4/6] fsck.overlay: correct redirect xattr check
Date: Fri, 29 Dec 2017 18:25:05 +0800 [thread overview]
Message-ID: <1c598a02-6d62-0f61-2c4b-3247ef73a59c@huawei.com> (raw)
In-Reply-To: <CAOQ4uxjSRwWWbBV9qQ7XCqf6Z+JAS0RVjOS+vPKL+4eGPYk1Pw@mail.gmail.com>
On 2017/12/29 17:32, Amir Goldstein Wrote:
>>>> + goto out;
>>>> + if (chk.exist && is_dir(&chk.st) &&
>>>> + !ovl_ask_question("Is merged dir", pathname, 1))
>>>> + ret = ovl_set_opaque(pathname);
>>>
>>> Same here. Better that fsck -y will set opaque right?
>>> So flip the question to "Should set opaque dir"
>>>
>>
>> Here is also not set opaque xattr in '-y' and '-p' mode.
>> I guess general user may not care about "invalid/duplicate redirect xattr"
>> when they modify underlying layers (eg: call "cp -a" or remove redirect origin
>> directory), but they probably know directories with the same name will merge
>> in overlayfs by default, and they should know the distribution of directories
>> after modification. So I prefer to merge directories. Anyway, neither will
>> affect consistency. :)
>>
>
> OK, but the question is still wrong, because answering No changes the
> file systems and didn't fsck -n guaranty NOT to change the file system?
> I think you probably need a more error prone interface for changing fs
> that guaranties you cannot change fs when -n was specified.
>
> The way I see it, the only way to resolve this is run several "pass"
> like e2fsck.
> The first pass just marks duplicate redirects
> The second pass (with -y) sets redirect dirs opaque and removes redirect
> The third pass will ask if to set merge dir opaque in case user answered No
> for any of the redirect dirs in second pass.
>
> Probably easier for you at this point is to flip the question and not
> implement the above.
>
You are right, I miss that -n option will change the file system, thanks
for pointing this out. For simplicity now, I will flip the question as
you said(set opaque xattr in with -y option). For the first choice (run
several pass), we can realize it if necessary in the future.
Thanks,
Yi.
next prev parent reply other threads:[~2017-12-29 10:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-28 11:40 [PATCH v3 0/6] overlay: implement fsck.overlay utility zhangyi (F)
2017-12-28 11:40 ` [PATCH v3 1/6] overlay: implement fsck utility zhangyi (F)
2017-12-29 9:20 ` Amir Goldstein
2017-12-28 11:40 ` [PATCH v3 2/6] fsck.overlay: add -n -p and -y options zhangyi (F)
2017-12-28 13:52 ` Amir Goldstein
2017-12-28 11:40 ` [PATCH v3 3/6] fsck.overlay: encapsulate underlying directories options zhangyi (F)
2017-12-28 13:59 ` Amir Goldstein
2017-12-28 11:40 ` [PATCH v3 4/6] fsck.overlay: correct redirect xattr check zhangyi (F)
2017-12-28 14:22 ` Amir Goldstein
2017-12-29 3:23 ` zhangyi (F)
2017-12-29 9:32 ` Amir Goldstein
2017-12-29 10:25 ` zhangyi (F) [this message]
2017-12-28 11:40 ` [PATCH v3 5/6] fsck.overlay: fix lower target lookup zhangyi (F)
2017-12-28 11:40 ` [PATCH v3 6/6] fsck.overlay: add impure xattr check zhangyi (F)
2017-12-28 13:18 ` Amir Goldstein
2017-12-29 2:21 ` zhangyi (F)
2017-12-29 7:03 ` Amir Goldstein
2017-12-29 7:39 ` zhangyi (F)
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=1c598a02-6d62-0f61-2c4b-3247ef73a59c@huawei.com \
--to=yi.zhang@huawei.com \
--cc=amir73il@gmail.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=miklos@szeredi.hu \
--cc=yangerkun@huawei.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