[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DVDs created with too large files



I have been using dvd+rw-tools (5.13.4.7.4) and mkisofs (cdrtools 1.11a29)
to write backups to DVD.  This generally works.  However I encountered
a problem when one of the files was 2351679431 bytes in size: the disk
was written with no errors reported, but on testing proved to be unreadable
to linux 2.4.21.  On mounting the disk a warning was reported:

Warning: defective CD-ROM.  Enabling "cruft" mount option.

The large file now appeared to be only 2869191 bytes and is truncated
on reading.

Examining the Linux sources shows the following comment in fs/isofs/inode.c:

	/*
	 * 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@fokus.gmd.de
	 */
	if ((inode->i_size < 0 || inode->i_size > 0x7FFFFFFE) &&
	    inode->i_sb->u.isofs_sb.s_cruft == 'n') {
		printk(KERN_WARNING "Warning: defective CD-ROM.  "
		       "Enabling \"cruft\" mount option.\n");
		inode->i_sb->u.isofs_sb.s_cruft = 'y';
	}

I think this is implying that files > 2GB are legal, but can not be
handled by the Linux kernel.  The comment also suggests that mkisofs
won't handle them.  However it doesn't (at least for this particular
version of mkisofs) produce any warning or error when the disk is
created.

Something to beware of, since it may cause confusion or lost data.

Gary



Reply to: