ISOFS corrupt filesizes
According to the (2.4.9) MAINTAINERS-File, ISOFS doesn't have a maintainer, so this probably best fits in this list.
I came across a (commercial) DVD with an ISOFS Filesystem on it and filesizes bigger than 1M.
I.e. "ls -l /mnt/cdrom/video_ts" shows
total 8153965
-r-xr-xr-x 1 root root 34816 Feb 29 2000 video_ts.bup
-r-xr-xr-x 1 root root 34816 Feb 29 2000 video_ts.ifo
-r-xr-xr-x 1 root root 1201278976 Feb 29 2000 video_ts.vob <---
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_01_0.bup
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_01_0.ifo
-r-xr-xr-x 1 root root 20480 Feb 29 2000 vts_01_0.vob
-r-xr-xr-x 1 root root 10240 Feb 29 2000 vts_01_1.vob
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_02_0.bup
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_02_0.ifo
-r-xr-xr-x 1 root root 967038976 Feb 29 2000 vts_02_1.vob
-r-xr-xr-x 1 root root 96256 Feb 29 2000 vts_03_0.bup
-r-xr-xr-x 1 root root 96256 Feb 29 2000 vts_03_0.ifo
-r-xr-xr-x 1 root root 195196928 Feb 29 2000 vts_03_0.vob
-r-xr-xr-x 1 root root 1073709056 Feb 29 2000 vts_03_1.vob
-r-xr-xr-x 1 root root 1073709056 Feb 29 2000 vts_03_2.vob
-r-xr-xr-x 1 root root 1073709056 Feb 29 2000 vts_03_3.vob
(...)Actually, that is what it _should_ show. Here is the actual output:
(kernel versions 2.2.18 through 2.4.9)
$ ls -l /mnt/cdrom/video_ts
Warning: defective CD-ROM. Enabling "cruft" mount option.
total 142925
-r-xr-xr-x 1 root root 34816 Feb 29 2000 video_ts.bup
-r-xr-xr-x 1 root root 34816 Feb 29 2000 video_ts.ifo
-r-xr-xr-x 1 root root 10096640 Feb 29 2000 video_ts.vob
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_01_0.bup
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_01_0.ifo
-r-xr-xr-x 1 root root 20480 Feb 29 2000 vts_01_0.vob
-r-xr-xr-x 1 root root 10240 Feb 29 2000 vts_01_1.vob
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_02_0.bup
-r-xr-xr-x 1 root root 18432 Feb 29 2000 vts_02_0.ifo
-r-xr-xr-x 1 root root 10737664 Feb 29 2000 vts_02_1.vob
-r-xr-xr-x 1 root root 96256 Feb 29 2000 vts_03_0.bup
-r-xr-xr-x 1 root root 96256 Feb 29 2000 vts_03_0.ifo
-r-xr-xr-x 1 root root 10647552 Feb 29 2000 vts_03_0.vob
-r-xr-xr-x 1 root root 16744448 Feb 29 2000 vts_03_1.vob
-r-xr-xr-x 1 root root 16744448 Feb 29 2000 vts_03_2.vob
-r-xr-xr-x 1 root root 16744448 Feb 29 2000 vts_03_3.vob
(...)Notice the corrupt filesizes. The culprit is obviously in the code which "printk"s the "cruft" message above.
In 2.4.9-kernel/fs/isofs/inode.c around line 1190 it says
if ((inode->i_size < 0 || inode->i_size > 1073741824) &&
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';
}My personal guess would be that the assumption that iso files can't be bigger than 1M unless the CD-ROM is defective is wrong.
(I don't know where the 1M comes from. 2M sounds more logical to me,
however)
After removing the "indode->i_size > 1073741824" test, I got the correct output for ls. Also was I able to cat (css-cat, actually) the whole 1201278976 bytes without an error, which may lead to the assumption the file is actually that big.
If I'm wrong and the dvd is actually broken, however, I'd like to suggest making the automatic cruft mount optional.
Greetings
Matthias
Quoted 8 lines
I came across a (commercial) DVD with an ISOFS Filesystem on it and filesizes bigger than 1M.
(...)
My personal guess would be that the assumption that iso files can't be bigger than 1M unless the CD-ROM is defective is wrong.
(I don't know where the 1M comes from. 2M sounds more logical to me,
however)
(...)
Please substitute 1M with 1G and 2M with 2G. Thank you. (My fault, sorry :) )
Greetings
Matthias
Followup to: <[email protected]> By author: Matthias Kramm <[email protected]> In newsgroup: linux.dev.kernel
Quoted 6 lines
According to the (2.4.9) MAINTAINERS-File, ISOFS doesn't have a maintainer, so this probably best fits in this list.
I came across a (commercial) DVD with an ISOFS Filesystem on it and filesizes bigger than 1M.
1 GB (not MB) you mean...
Quoted 4 lines
My personal guess would be that the assumption that iso files can't be bigger than 1M unless the CD-ROM is defective is wrong.
(I don't know where the 1M comes from. 2M sounds more logical to me,
however)
1 GB comes from the fact that some old CD's actually put garbage in the upper byte of the file size, so the test triggers if the size is larger than any CD can be. Unfortunately, DVDs are a lot bigger than CDs and that assumption is no longer correct.
Quoted 6 lines
After removing the "
indode->i_size> 1073741824" test, I got the correct output for ls. Also was I able to cat (css-cat, actually) the whole 1201278976 bytes without an error, which may lead to the assumption the file is actually that big.
If I'm wrong and the dvd is actually broken, however, I'd like to suggest making the automatic cruft mount optional.
The automatic cruft mount option should probably be conditionalized not on a fixed size, but on the actual size of the filesystem.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>
Quoted 4 lines
1 GB comes from the fact that some old CD's actually put garbage in the upper byte of the file size, so the test triggers if the size is larger than any CD can be. Unfortunately, DVDs are a lot bigger than CDs and that assumption is no longer correct.
DVD is supposed to be using 1Gb files. I don't think its a big issue as we support UDF too
Quoted 9 lines · Alan Cox
Quoted 5 lines
1 GB comes from the fact that some old CD's actually put garbage in the upper byte of the file size, so the test triggers if the size is larger than any CD can be. Unfortunately, DVDs are a lot bigger than CDs and that assumption is no longer correct.
DVD is supposed to be using 1Gb files. I don't think its a big issue as we support UDF too
Well, it's not all about DVDs used for video. I think there are legitimate reasons to have very large files on a DVD-ROM, and they're likely to be encoded in iso9660 format (for maximum compatibility) as long as we don't have individual files > 4 GB.
-hpa