]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: use common interp of st_nlink for dirs 21652/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 25 Apr 2018 20:07:34 +0000 (13:07 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 30 Apr 2018 03:04:43 +0000 (20:04 -0700)
commit67c7e4619188cfd684e59e3cb538948ae8f2b74c
treeb64d18fe9c284d2eda70c9adde88cfe49b38cc01
parent543d8a0e4cfefd2c4e8e22f151555bb77617aa21
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>
src/client/Client.cc
src/client/Inode.cc
src/test/libcephfs/test.cc