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

2017-04-08 Thread David Howells
Eryu Guan wrote: > > Overlayfs uses nlink = 1 for merge dirs to silence 'find' et al. > > Ext4 uses nlink = 1 for directories with more than 32K subdirs > > (EXT4_FEATURE_RO_COMPAT_DIR_NLINK). > > > > But in both those fs newly created directories will have nlink = 2. > > Is

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

2017-04-08 Thread Eryu Guan
On Wed, Apr 05, 2017 at 03:32:30PM +0300, Amir Goldstein wrote: > On Wed, Apr 5, 2017 at 3:30 PM, David Sterba wrote: > > On Wed, Apr 05, 2017 at 11:53:41AM +0100, David Howells wrote: > >> I've added a test to xfstests that exercises the new statx syscall. > >> However, > >>

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

2017-04-05 Thread Amir Goldstein
On Wed, Apr 5, 2017 at 3:30 PM, David Sterba wrote: > On Wed, Apr 05, 2017 at 11:53:41AM +0100, David Howells wrote: >> 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

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

2017-04-05 Thread David Sterba
On Wed, Apr 05, 2017 at 11:53:41AM +0100, David Howells wrote: > 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

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

2017-04-05 Thread David Howells
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