From owner-cvs-all Wed May 22 1:50:27 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1E9B437B406; Wed, 22 May 2002 01:50:19 -0700 (PDT) Received: (from bde@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4M8oJ672146; Wed, 22 May 2002 01:50:19 -0700 (PDT) (envelope-from bde) Message-Id: <200205220850.g4M8oJ672146@freefall.freebsd.org> From: Bruce Evans Date: Wed, 22 May 2002 01:50:19 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/isofs/cd9660 cd9660_vnops.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG bde 2002/05/22 01:50:19 PDT Modified files: sys/isofs/cd9660 cd9660_vnops.c Log: Quick fix for non-unique inode numbers for hard links. We use the byte offset of the directory entry for the inode number for all types of files except directories, although this breaks hard links for non-directories even if it doesn't cause overflow. Just ignore this broken inode number for stat() and readdir() and return a less broken one (the block offset of the file), so that applications normally can't see the brokenness. This leaves at least the following brokenness: - extra inodes, vnodes and caching for hard links. - various overflow bugs. cd9660 supports 64-bit block numbers, but we silently ignore the top 32 bits in isonum_733() and then drop another 10 bits for our broken inode numbers. We may also have sign extension bugs from storing 32-bit extents in ints and longs even if ints are 32-bits. These bugs affect DVDs. mkisofs apparently limits them by writing directory entries first. Inode numbers were broken mainly in 4.4BSD-Lite2. FreeBSD-1.1.5 seems to have a correct implementation modulo the overflow bugs. We need to look up directory entries from inodes for symlinks only. FreeBSD-1.1.5 use separate fields (iso_parent_extent, iso_parent) to point to the directory entry. 4.4BSD-Lite doesn't have these, and abuses i_ino to point to the directory entry. Correct pointers are impossible for hard links, but symlinks can't be hard links. Revision Changes Path 1.77 +14 -6 src/sys/isofs/cd9660/cd9660_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message