Does btrfs get nlink on directories wrong? -- was Re: [PATCH 2/4] xfstests: Add first statx test [ver #5]

David Howells
2017-04-05T10:53:46Z

I've added a test to xfstests that exercises the new statx syscall. However,
it fails on btrfs:

Test statx on a directory
+[!] stx_nlink differs, 1 != 2
+Failed
+stat_test failed

because a new directory it creates has an nlink of 1, not 2. Is this a case
of my making an incorrect assumption or is it an fs bug?

David