From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 15:45:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2028916A41F for ; Thu, 23 Jun 2005 15:45:44 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7B7743D1F for ; Thu, 23 Jun 2005 15:45:43 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 5B5D760FB; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 4541F60ED; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 2122533D13; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) To: Scott Long References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 23 Jun 2005 17:45:32 +0200 In-Reply-To: <42BAC1CB.30402@samsco.org> (Scott Long's message of "Thu, 23 Jun 2005 08:06:03 -0600") Message-ID: <86mzphcc0z.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Tests: ALL_TRUSTED,AWL,BAYES_00 X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: freebsd-hackers@freebsd.org, Gregg Cooper Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 15:45:44 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Scott Long writes: > Gregg Cooper wrote: > > 15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates > > 15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab > > 83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale > > 83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac > > 83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale > > 83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov > > 99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp > > 99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist > Maybe it's a bug in mkisofs? ISO 9660 filesystems donn't have inode numbers. The cd9660 code fakes them based on the location of each file's contents. This model breaks down for empty files, which have no contents and thus no meaningful location. Apparently, mkisofs simply keeps track of the last extent written and uses that for the location of the next file regardless of whether it actually has any contents, so empty files get the same inode number as the previous non-empty file. The attached patch will make mkisofs assign the lowest valid non-zero address to all empty files. They will therefore appear to be hard links to eachother, but not to random non-empty files. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=mkisofs.diff --- mkisofs/write.c.orig Thu Jun 23 17:16:26 2005 +++ mkisofs/write.c Thu Jun 23 17:19:13 2005 @@ -1238,7 +1238,8 @@ } dwpnt->next = NULL; dwpnt->size = s_entry->size; - dwpnt->extent = last_extent; + dwpnt->extent = dwpnt->size ? + last_extent : ISO_BLOCKS(1); set_733((char *) s_entry->isorec.extent, last_extent); s_entry->starting_block = last_extent; --=-=-=--