From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikulas Patocka Subject: Re: Finding hardlinks Date: Wed, 3 Jan 2007 20:17:34 +0100 (CET) Message-ID: References: <20061221185850.GA16807@delft.aura.cs.cmu.edu> <1166869106.3281.587.camel@laptopd505.fenrus.org> <20061229100223.GF3955@ucw.cz> <20070101235320.GS8104@delft.aura.cs.cmu.edu> <20070103185815.GA2182@janus> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Jan Harkes , Pavel Machek , Arjan van de Ven , Miklos Szeredi , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from artax.karlin.mff.cuni.cz ([195.113.31.125]:45383 "EHLO artax.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751084AbXACTRf (ORCPT ); Wed, 3 Jan 2007 14:17:35 -0500 To: Frank van Maarseveen In-Reply-To: <20070103185815.GA2182@janus> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 3 Jan 2007, Frank van Maarseveen wrote: > On Tue, Jan 02, 2007 at 01:04:06AM +0100, Mikulas Patocka wrote: >> >> I didn't hardlink directories, I just patched stat, lstat and fstat to >> always return st_ino == 0 --- and I've seen those failures. These failures >> are going to happen on non-POSIX filesystems in real world too, very >> rarely. > > I don't want to spoil your day but testing with st_ino==0 is a bad choice > because it is a special number. Anyway, one can only find breakage, > not prove that all the other programs handle this correctly so this is > kind of pointless. > > On any decent filesystem st_ino should uniquely identify an object and > reliably provide hardlink information. The UNIX world has relied upon this > for decades. A filesystem with st_ino collisions without being hardlinked > (or the other way around) needs a fix. ... and that's the problem --- the UNIX world specified something that isn't implementable in real world. You can take a closed box and say "this is POSIX cerified" --- but how useful such box could be, if you can't access CDs, diskettes and USB sticks with it? Mikulas