Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404073

path-lookup inconsistency ?

From Badhri Jagan Sridharan <badhri@google.com>
Newsgroups linux.kernel
Subject path-lookup inconsistency ?
Date 2016-05-20 04:30 +0200
Message-ID <rAIml-86S-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

I mounted overlayfs at /

My cat /proc/mounts looks like the following.
# cat /proc/mounts
/dev/root / squashfs ro,seclabel,relatime 0 0
..
overlayfs / overlay
rw,relatime,lowerdir=/,upperdir=/cache/upper,workdir=/cache/working 0

0

The original blockdevice at fs root is squashfs formatted so doesnt
support write operations. I mounted overlayfs on fs root to cache the
writes made.

While in /, the filesystem does not allow me to create files/directories,
if I dont prefix it with ".." directive.

hikey:/ # mkdir test
mkdir: 'testt12': Read-only file system
hikey:/ # mkdir ../test

"mkdir ../test" command succeeds.

I traced through the fs/namei.c code to notice that __follow_mount_rcu
does not get called when I execute "mkdir test" whereas, it gets called from
the follow_dotdot_rcu when I execute "mkdir ../test"

What is the expected behavior ? Should "mkdir test" and "mkdir ../test"
both succeed ?

Similar inconsistency is found with "ls" and "ls .." as well while in fs root.

Thanks,
Badhri

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

path-lookup inconsistency ? Badhri Jagan Sridharan <badhri@google.com> - 2016-05-20 04:30 +0200
  Re: path-lookup inconsistency ? Al Viro <viro@ZenIV.linux.org.uk> - 2016-05-20 07:30 +0200

csiph-web