From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 25 21:00:22 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3126116A420 for ; Sat, 25 Feb 2006 21:00:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A51BE43D46 for ; Sat, 25 Feb 2006 21:00:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1PL0LpD017070 for ; Sat, 25 Feb 2006 21:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1PL0LOl017069; Sat, 25 Feb 2006 21:00:21 GMT (envelope-from gnats) Date: Sat, 25 Feb 2006 21:00:21 GMT Message-Id: <200602252100.k1PL0LOl017069@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= Cc: Subject: Re: kern/91488: [isofs] [patch] cd9660 filesystem cannot handle files larger than 2GB X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2006 21:00:22 -0000 The following reply was made to PR kern/91488; it has been noted by GNATS. From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= To: bug-followup@FreeBSD.org, freebsd-cd9660-bug@z42.net Cc: Subject: Re: kern/91488: [isofs] [patch] cd9660 filesystem cannot handle files larger than 2GB Date: Sat, 25 Feb 2006 17:56:34 -0300 The real patches should be a little more refined than these. For example, I would expect that iso_extent and iso_start have the same type of i_size. Anothe good approach could be to change the inline definition of isonum_733 to be u_int32_t, instead of putting a cast somewhere else. So, these would be my patches: diff -ru /tmp/cd9660/cd9660_node.h /sys/isofs/cd9660/cd9660_node.h --- /tmp/cd9660/cd9660_node.h Thu Jun 17 14:16:48 2004 +++ /sys/isofs/cd9660/cd9660_node.h Sat Feb 25 17:45:34 2006 @@ -71,9 +71,9 @@ doff_t i_offset; /* offset of free space in directory */ ino_t i_ino; /* inode number of found directory */ - long iso_extent; /* extent of file */ - long i_size; - long iso_start; /* actual start of data of file (may be different */ + u_int32_t iso_extent; /* extent of file */ + u_int32_t i_size; + u_int32_t iso_start; /* actual start of data of file (may be different */ /* from iso_extent, if file has extended attributes) */ ISO_RRIP_INODE inode; }; diff -ru /tmp/cd9660/iso.h /sys/isofs/cd9660/iso.h --- /tmp/cd9660/iso.h Wed Jun 16 06:47:12 2004 +++ /sys/isofs/cd9660/iso.h Sat Feb 25 17:47:59 2006 @@ -295,16 +295,16 @@ #ifndef UNALIGNED_ACCESS -static __inline int isonum_723(u_char *); -static __inline int +static __inline u_int16_t isonum_723(u_char *); +static __inline u_int16_t isonum_723(p) u_char *p; { return *p|(p[1] << 8); } -static __inline int isonum_733(u_char *); -static __inline int +static __inline u_int32_t isonum_733(u_char *); +static __inline u_int32_t isonum_733(p) u_char *p; { I am using these patches in FreeBSD 5-STABLE, so far without problems. Please remember to MFC them...