From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikulas Patocka Subject: Re: Finding hardlinks Date: Wed, 3 Jan 2007 20:04:41 +0100 (CET) Message-ID: References: <1166869106.3281.587.camel@laptopd505.fenrus.org> <4593890C.8030207@panasas.com> <1167300352.3281.4183.camel@laptopd505.fenrus.org> <4593E1B7.6080408@panasas.com> <20070102191504.GA5276@ucw.cz> <20070103115632.GA3062@elf.ucw.cz> <20070103135455.GA24620@parisc-linux.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: matthew@wil.cx, pavel@ucw.cz, bhalevy@panasas.com, arjan@infradead.org, jaharkes@cs.cmu.edu, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, nfsv4@ietf.org Return-path: Received: from artax.karlin.mff.cuni.cz ([195.113.31.125]:44957 "EHLO artax.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067AbXACTEm (ORCPT ); Wed, 3 Jan 2007 14:04:42 -0500 To: Miklos Szeredi In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 3 Jan 2007, Miklos Szeredi wrote: >>> High probability is all you have. Cosmic radiation hitting your >>> computer will more likly cause problems, than colliding 64bit inode >>> numbers ;) >> >> Some of us have machines designed to cope with cosmic rays, and would be >> unimpressed with a decrease in reliability. > > With the suggested samefile() interface you'd get a failure with just > about 100% reliability for any application which needs to compare a > more than a few files. The fact is open files are _very_ expensive, > no wonder they are limited in various ways. > > What should 'tar' do when it runs out of open files, while searching > for hardlinks? Should it just give up? Then the samefile() interface > would be _less_ reliable than the st_ino one by a significant margin. You could do samefile() for paths --- as for races --- it doesn't matter in this scenario, it is no more racy than stat or lstat. Mikulas > Miklos >