simplifying linux_emul_convpath()

Harti Brandt brandt at fokus.fraunhofer.de
Wed Jan 14 08:47:26 PST 2004


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


More information about the freebsd-current mailing list