Date: Sat, 25 Feb 2006 21:00:21 GMT From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= <jonny@jonny.eng.br> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/91488: [isofs] [patch] cd9660 filesystem cannot handle files larger than 2GB Message-ID: <200602252100.k1PL0LOl017069@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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?= <jonny@jonny.eng.br>
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...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602252100.k1PL0LOl017069>
