Re: simplifying linux_emul_convpath()

From: Harti Brandt <brandt_at_fokus.fraunhofer.de>
Date: Wed, 14 Jan 2004 17:47:04 +0100 (CET)
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_at_fokus.fraunhofer.de, harti_at_freebsd.org
Received on Wed Jan 14 2004 - 07:47:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:38 UTC