]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: don't use special faked-up inode for /.. 12766/head
authorJeff Layton <jlayton@redhat.com>
Tue, 3 Jan 2017 17:56:51 +0000 (12:56 -0500)
committerJeff Layton <jlayton@redhat.com>
Tue, 3 Jan 2017 17:56:51 +0000 (12:56 -0500)
commit95edad2d058575231bb9b5468559f7b42667f40e
treec431dce017f2578ce37e3a7d1026ffab7b4afa9d
parent5b402f8a7b5a763852e93cd0a5decd34572f4518
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.

Fixes: http://tracker.ceph.com/issues/18408
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 30d4ca01db0de9a1e12658793ba9bf9faf0331dd)
src/client/Client.cc
src/include/ceph_fs.h