]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: don't use special faked-up inode for /..
authorJeff Layton <jlayton@redhat.com>
Fri, 12 Aug 2016 22:48:12 +0000 (18:48 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 12 Aug 2016 22:48:12 +0000 (18:48 -0400)
commit30d4ca01db0de9a1e12658793ba9bf9faf0331dd
tree68c893777b51304731ac2e5c00d40153a2b028e8
parent9bcc3aa7aac3d1fbb36b54fcde13fc57fd892394
client: don't use special faked-up inode for /..

The CEPH_INO_DOTDOT thing is quite strange. Under most OS (Linux
included), the parent of the root is itself. IOW, at the root, '.' and
'..' refer to the same inode.

Change the ceph client to do the same, as this allows users to get
valid stat info for '..', as well as elimnating some special-casing.

Also in several places, we're checking dn_set.empty as an indicator
of being the root. While that is true for the root, it's also true
for unlinked directories.

This patch has treats them the same. An unlinked directory will
be reparented to itself, effectively acting as a root of its own.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/include/ceph_fs.h