public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kramm <matthias.kramm@stud.tu-muenchen.de>
To: linux-kernel@vger.kernel.org
Subject: ISOFS corrupt filesizes
Date: Fri, 14 Sep 2001 14:54:17 +0200	[thread overview]
Message-ID: <20010914145352.A9952@stud.tu-muenchen.de> (raw)


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



             reply	other threads:[~2001-09-14 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-14 12:54 Matthias Kramm [this message]
2001-09-14 16:06 ` ISOFS corrupt filesizes 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010914145352.A9952@stud.tu-muenchen.de \
    --to=matthias.kramm@stud.tu-muenchen.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox