linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ISOFS corrupt filesizes
@ 2001-09-14 12:54 Matthias Kramm
  2001-09-14 16:06 ` Matthias Kramm
  2001-09-15  0:54 ` H. Peter Anvin
  0 siblings, 2 replies; 5+ messages in thread
From: Matthias Kramm @ 2001-09-14 12:54 UTC (permalink / raw)
  To: linux-kernel


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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ISOFS corrupt filesizes
  2001-09-14 12:54 ISOFS corrupt filesizes Matthias Kramm
@ 2001-09-14 16:06 ` Matthias Kramm
  2001-09-15  0:54 ` H. Peter Anvin
  1 sibling, 0 replies; 5+ messages in thread
From: Matthias Kramm @ 2001-09-14 16:06 UTC (permalink / raw)
  To: linux-kernel

> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ISOFS corrupt filesizes
  2001-09-14 12:54 ISOFS corrupt filesizes Matthias Kramm
  2001-09-14 16:06 ` Matthias Kramm
@ 2001-09-15  0:54 ` H. Peter Anvin
  2001-09-15  1:28   ` Alan Cox
  1 sibling, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2001-09-15  0:54 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <20010914145352.A9952@stud.tu-muenchen.de>
By author:    Matthias Kramm <matthias.kramm@stud.tu-muenchen.de>
In newsgroup: linux.dev.kernel
> 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...

> 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.

> 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

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ISOFS corrupt filesizes
  2001-09-15  0:54 ` H. Peter Anvin
@ 2001-09-15  1:28   ` Alan Cox
  2001-09-15  1:45     ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2001-09-15  1:28 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ISOFS corrupt filesizes
  2001-09-15  1:28   ` Alan Cox
@ 2001-09-15  1:45     ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2001-09-15  1:45 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan Cox wrote:
>>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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-15  1:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-14 12:54 ISOFS corrupt filesizes Matthias Kramm
2001-09-14 16:06 ` Matthias Kramm
2001-09-15  0:54 ` H. Peter Anvin
2001-09-15  1:28   ` Alan Cox
2001-09-15  1:45     ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).