linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roel Van de Paar <roel.vandepaar@percona.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Bug: getcwd: cannot access parent directories
Date: Fri, 28 Sep 2018 07:01:01 +1000	[thread overview]
Message-ID: <CAGQTitOKGj_+DDxaGnfRRdZ+TJxhZ8SxBLcZzLF-vtxYDZXbEA@mail.gmail.com> (raw)
In-Reply-To: <04f4b19f-2990-6ad3-1ae4-b41da1ca089f@schaufler-ca.com>

Hi Casey,

On 28 September 2018 at 05:46, Casey Schaufler <casey@schaufler-ca.com> wrote:

> Please try doing this under strace, in particular
>
>         strace mv 3 /dev/shm
>
> What you will see is that the mv command does a copy/delete
> when changing filesystems. The original "2" directory, which
> is your current working directory, will have no parent as the
> original "1" will have been removed.
>
>>>
>>> Back to session 1
>>>   cd ..   # fail
>>>   cd ..   # fail
>>>   cd ..   # fail
>>>   cd ..   # fail
>>>   cd ..   # fail
>>>   cd ..   # fail
>>>   cd ..   # works, but to completely incorrect directory given the
>>> many 'cd ..'```
>>>
>>> The problem is made more clear here by using 3/4/5/6/7 but you can
>>> also just use a single subdir to see it
>> Roel Van de Paar, Technical Director - Quality Assurance, Percona
>
> The system is working properly.

Thank you for the analysis.

I can see your point, but it looks like this could be improved by
matching the behavior when not changing filesystems.

Also, there is a difference between working when it is a different
filesystem or not - so there is inconsistency in operation.

      reply	other threads:[~2018-09-27 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  8:16 Bug: getcwd: cannot access parent directories Roel Van de Paar
2018-09-27  1:54 ` Roel Van de Paar
2018-09-27 19:46   ` Casey Schaufler
2018-09-27 21:01     ` Roel Van de Paar [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=CAGQTitOKGj_+DDxaGnfRRdZ+TJxhZ8SxBLcZzLF-vtxYDZXbEA@mail.gmail.com \
    --to=roel.vandepaar@percona.com \
    --cc=casey@schaufler-ca.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).