]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: use common interp of st_nlink for dirs 21796/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 25 Apr 2018 20:07:34 +0000 (13:07 -0700)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 3 May 2018 17:16:40 +0000 (19:16 +0200)
commitab4254452b1d1f490dde5603196f68893b109d01
tree20e8d51dcaa27a04bf24027eb10a863363e29fbc
parent1f81f7810ad20374e7f761d2ab26a1131d3a51cc
client: use common interp of st_nlink for dirs

Apparently some applications use this (like mail servers) and since it's
trivial to support, let's do it. Idea is that st_nlinks for a directory is
either 0 (it is unlinked) or 2 + the number of sub-directories (which have ..
parent links).

Fixes: https://tracker.ceph.com/issues/23873
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 67c7e4619188cfd684e59e3cb538948ae8f2b74c)

Conflicts:
        src/client/Inode.cc
src/client/Client.cc
src/client/Inode.cc
src/test/libcephfs/test.cc