From owner-freebsd-current@FreeBSD.ORG Wed Jan 14 08:47:26 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32F5516A4CF; Wed, 14 Jan 2004 08:47:26 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BD1C43D53; Wed, 14 Jan 2004 08:47:05 -0800 (PST) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])i0EGl4L14759; Wed, 14 Jan 2004 17:47:04 +0100 (MET) Date: Wed, 14 Jan 2004 17:47:04 +0100 (CET) From: Harti Brandt To: Robert Watson In-Reply-To: Message-ID: <20040114174404.S14691@beagle.fokus.fraunhofer.de> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Don Lewis cc: current@freebsd.org Subject: Re: simplifying linux_emul_convpath() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: harti@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 16:47:26 -0000 On Wed, 14 Jan 2004, Robert Watson wrote: RW> RW>On Wed, 14 Jan 2004, Don Lewis wrote: RW> RW>> I just stumbled across a vnode locking violation in RW>> linux_emul_convpath(). Rather than locking and unlocking each vnode for RW>> the VOP_GETATTR() calls, is there any reason that this code should not RW>> be simplified to just compare the vnode pointers rather than fetching RW>> the vnode attributes and comparing the attributes for equality. RW> RW>For some time, I've been thinking of adding samefile() and fsamefile() RW>system calls to FreeBSD, which would allow userspace applications to RW>determine if two names or file handles refer to the same object without RW>playing games with inode numbers, device ids, etc. The reason to do this RW>would be that 32-bit inode numbers are subject to collision on large file RW>systems. My initial implementation simply compared vnode pointers, but This is a seriouse violation of Posix and may make applications like tar, mkisofs and friends do the wrong things. Are 32-bit inodes and UFS1 restriction? harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org