Hardlink count for directories

Jeremy Allison jra at samba.org
Sat Jan 19 01:37:40 GMT 2008


On Thu, Jan 17, 2008 at 05:53:06PM +0100, Volker Lendecke wrote:
> On Thu, Jan 17, 2008 at 04:50:16PM +0100, Corinna Vinschen wrote:
> 
> > I'm core developer for Cygwin.  For quite some time we have a problem
> > with the hardlink count of directories returned by Samba.  Two years
> > ago I filed a bugzilla report
> > 
> >   https://bugzilla.samba.org/show_bug.cgi?id=3529
> > 
> > Jeremy asked me to test against remote NTFS shares, which I did, see
> > 
> >   https://bugzilla.samba.org/show_bug.cgi?id=3529#c2
> >   https://bugzilla.samba.org/show_bug.cgi?id=3529#c3
> > 
> > I was wondering if this problem could be solved in the next versions of
> > Samba by just returning a link count of 1 for all directories.  This
> > would be least error prone, as well as most conforming to native Windows
> > shares, as descibed in the above test results.
> 
> Ok, I've done some testing with the "allinfo" smbclient4
> command. It does seem that regardless of the number of
> files/subdirectories inside a directory, Windows always
> returns 1 as nlink. The attached patch also does it for
> v3-2-test.
> 
> Jeremy, what do you think?

Got time to review it properly - definately the right
thing to do. Pushed.

Thanks !

Jeremy.


More information about the samba-technical mailing list