From: Miklos S. <mi...@sz...> - 2011-10-07 11:01:24
|
Han-Wen Nienhuys <ha...@gm...> writes: > On Wed, Oct 5, 2011 at 8:46 AM, Miklos Szeredi <mi...@sz...> wrote: >>> The failing machine runs >>> >>> Linux haring 2.6.40.4-5.fc15.i686 #1 SMP Tue Aug 30 14:54:41 UTC 2011 >>> i686 i686 i386 GNU/Linux >> >> 2.6.39 added a check to link(2) to not allow unlink if nlink is zero >> (commit aae8a97d "fs: Don't allow to create hardlink for deleted file") >> >> In the CREATE reply nlink is set to 1, but in the subsequent GETATTR on >> the same inode the filesystem is replying with nlink=0. This causes >> link(2) to fail on 2.6.39 and later. > > Ahhh! Thanks. Do we need to present consisten Nlink numbers, or is > filling Nlink=1 everywhere good enough? You mean for directories? For directories nlink=1 should work fine, there's no need to calculate from the number of subdirectories. Thanks, Miklos |