simplifying linux_emul_convpath()

Harti Brandt brandt at
Wed Jan 14 08:47:26 PST 2004

On Wed, 14 Jan 2004, Robert Watson wrote:

RW>On Wed, 14 Jan 2004, Don Lewis wrote:
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>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

harti brandt,
brandt at, harti at

More information about the freebsd-current mailing list