Project

General

Profile

Actions

Bug #23873

closed

cephfs does not count st_nlink for directories correctly?

Added by Danny Al-Gaaf about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, kceph
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Not sure if this behavior is by intention, but if you create a empty directory on cephfs and call stat on the directory it returns '1' for st_nlink while other filesystems like XFS, EXT3/4 and even NFS return '2' for hard links.

How to reproduce:
1) mount cephfs
2) create directory on cephfs
3) call "stat" on the directory and check for "Links"
4) outcome: cephfs=1 but e.g. XFS=2

Tested with ceph version 12.2.1-361-gaea79b8b7a (aea79b8b7a65a8ca5cc1de84c7fe7d99eaa72ec0) luminous (stable)


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #23987: luminous: cephfs does not count st_nlink for directories correctly?ResolvedDanny Al-GaafActions
Actions

Also available in: Atom PDF