Re: Q: large files in iso9660 ?

From: Erik Mouw
Date: Tue Feb 03 2004 - 08:37:40 EST


On Mon, Feb 02, 2004 at 12:24:31AM +0200, P. Christeas wrote:
> I've tried to create a disk (DVD) which contains a single 3.8GB file. The
> creation (mkisofs) worked and the disk's TOC reads 3.8GB.

No, it didn't. Last time I tried mkisofs warned about files being
larger than 2GB. Feel free to ignore the warnings, though.

> However, the
> filesystem reads as if one ~9MB file only exists.
> I guess large files in isofs may be out of spec.
>
> Q: What's the file size limit in iso9660?

About 2GB.

> Q: Is there any chance the negative number (although out of spec) may be
> correctly interpreted (mount option) ?

The kernel (2.6 and 2.4) has the following code in isofs_read_inode():

/*
* The ISO-9660 filesystem only stores 32 bits for file size.
* mkisofs handles files up to 2GB-2 = 2147483646 = 0x7FFFFFFE bytes
* in size. This is according to the large file summit paper from 1996.
* WARNING: ISO-9660 filesystems > 1 GB and even > 2 GB are fully
* legal. Do not prevent to use DVD's schilling@xxxxxxxxxxxx
*/
if ((inode->i_size < 0 || inode->i_size > 0x7FFFFFFE) &&
sbi->s_cruft == 'n') {
printk(KERN_WARNING "Warning: defective CD-ROM. "
"Enabling \"cruft\" mount option.\n");
sbi->s_cruft = 'y';
}

IOW: your kernel should have warned you about the defective CDROM and
truncated filesizes to 16MB (which is what the "cruft" mount option
does).


Erik

--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/