From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
Seebs <seebs@seebs.net>,
oe-core <openembedded-core@lists.openembedded.org>
Subject: Re: About pseudo's chmod
Date: Tue, 2 Aug 2016 09:52:43 +0800 [thread overview]
Message-ID: <579FFCEB.6090200@windriver.com> (raw)
In-Reply-To: <1470092106.9142.113.camel@linuxfoundation.org>
On 08/02/2016 06:55 AM, Richard Purdie wrote:
> On Mon, 2016-08-01 at 15:17 -0500, Seebs wrote:
>> On 1 Aug 2016, at 15:01, Richard Purdie wrote:
>>
>>> No, we're actually expecting it to retain the mode it was given via
>>> the
>>> hardlink under pseudo.
>>>
>>> This is what a real world system would do and in this case we could
>>> track it via pseudo since pseudo is loaded when the hardlink is
>>> created. It would be unreasonable for pseudo to track all hardlinks
>>> but
>>> tracking ones created under it does seem reasonable?
>>
>> Hmm. Well, strictly speaking, the link created under pseudo *does*
>> get
>> tracked. Hmm. But an implicit request to track also the thing linked
>> to
>> is not a horrible idea. Although you'd still be able to beat it:
>>
>> $ touch file1
>> $ ln file1 file2
>> $ pseudo
>> # ln file2 file3
>> # chmod 777 file3
>> # rm file2 file3
>> # ls -l file1
>>
>> The general case of "find everything this link also refers to" is
>> clearly out of scope.
>
> Agreed.
>
>> That said... Hmm. I think my main feeling is, if we want
>> to link to the file, and we want the changes to the linked file to
>> survive, we should probably either create that file under pseudo, or
>> explicitly claim it with pseudo when we start wanting to do the
>> tracking.
>> (You can trivially do this to a tree with chown -R root tree).
>
> The trouble is that for speed, we do create trees of hardlinked files
> and play games with those and sstate amongst other things. Its
> obviously faster to do this than make physical copies of the files.
> Given what I know of the code paths, I suspect that tracking the source
> of a hardlink would make life much easier for us. Obviously we can go
> and start adding "chown -R" calls everywhere but that seems a little
> ugly to me and doesn't do performance any favours.
>
> Is there any significant downside if we do track the source of
> hardlinks?
AFAIK, no.
And when remove file2, but file1's permission is changed, it should
be considered as a bug.
// Robert
>
> Cheers,
>
> Richard
>
>
>
>
next prev parent reply other threads:[~2016-08-02 1:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 10:23 About pseudo's chmod Robert Yang
2016-07-05 13:10 ` Mark Hatle
2016-07-05 14:10 ` Robert Yang
2016-07-29 7:38 ` Robert Yang
2016-07-29 7:40 ` Robert Yang
2016-07-29 16:02 ` Seebs
2016-08-01 5:57 ` Robert Yang
2016-08-01 8:42 ` Seebs
2016-08-01 8:57 ` Robert Yang
2016-08-01 18:17 ` Seebs
2016-08-01 20:01 ` Richard Purdie
2016-08-01 20:17 ` Seebs
2016-08-01 22:55 ` Richard Purdie
2016-08-01 23:36 ` Mark Hatle
2016-08-02 3:39 ` Seebs
2016-08-02 1:52 ` Robert Yang [this message]
2016-08-02 3:43 ` Seebs
2016-08-02 6:07 ` Robert Yang
2016-08-02 6:08 ` Robert Yang
2016-08-02 6:30 ` Seebs
2016-08-02 6:44 ` Robert Yang
2016-08-02 6:50 ` Seebs
2016-08-02 8:32 ` Robert Yang
2016-08-02 19:16 ` Seebs
2016-08-02 19:18 ` Burton, Ross
2016-08-02 15:12 ` Mark Hatle
2016-08-02 19:19 ` Seebs
2016-08-02 19:39 ` Mark Hatle
2016-08-02 19:53 ` Seebs
2016-08-02 3:37 ` Seebs
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=579FFCEB.6090200@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=seebs@seebs.net \
/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