Bug 1930 - 2.6.1 fails to mount large iso9660 dvd discs with ATAPI drivers, succeeds with SCSI.
Summary: 2.6.1 fails to mount large iso9660 dvd discs with ATAPI drivers, succeeds wit...
Status: CLOSED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: IDE (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Luca Tettamanti
URL:
Keywords:
: 3882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-21 16:28 UTC by Jeff Gardner
Modified: 2004-12-18 14:31 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg for linux-2.6.3-ide (9.46 KB, text/plain)
2004-02-28 15:22 UTC, Jeff Gardner
Details
Commands used to burn iso discs. (813 bytes, text/plain)
2004-02-28 15:29 UTC, Jeff Gardner
Details
Output from a few tests I made on 2 different dvd's and 2 different kernels. (2.51 KB, text/plain)
2004-02-28 15:36 UTC, Jeff Gardner
Details
Fix for the bug (1.54 KB, patch)
2004-12-18 09:39 UTC, Luca Tettamanti
Details | Diff

Description Jeff Gardner 2004-01-21 16:28:02 UTC
Distribution: Gentoo

Hardware Environment: 
Abit NF-7 (nforce2) Mobo, Athlon-XP 2500 (Barton), TDK Indi DVD+RW, Creative PC-DVD.

################################################################################

Software Environment: 
Linux gentoo 2.6.1 #3 Wed Jan 21 17:53:53 CST 2004 i686 AMD Athlon(tm) XP 2500+
AuthenticAMD GNU/Linux
 
Gnu C                  3.2.3
Gnu make               3.80
util-linux             2.11z
mount                  2.11z
module-init-tools      0.9.15-pre4
e2fsprogs              1.34
nfs-utils              1.0.6
Linux C Library        2.3.2
Dynamic linker (ldd)   2.3.2
Procps                 3.1.12
Net-tools              1.60
Kbd                    1.08
Sh-utils               5.0.91
Modules Loaded         nvnet nvidia
################################################################################

Problem Description:
I've used growisofs (a mkisofs frontend) to write big (1.4 Gb) .avi's to my
DVD+RW under both 2.4.xx and 2.6 kernels (atapi on the 2.6). However, none of my
2.6 kernels (atapi only) seem to be able to mount nearly full dvd's, while my
2.4.24 kernel (scsi-emulation) can mount dvd's that are full (about 4.3 Gb).
Enabling scsi emulation and passing hdc=ide-scsi at boot fixes the problem for
linux-2.6.1, so it seems that there may be a problem with an atapi-only dvdrom
mounting dvd's with over 3.3 Gb on them.

I also have a regular dvdplayer attched and it is known as:

/dev/cdroms/cdrom0 -> ../ide/host0/bus1/target1/lun0/cd

This drive reports "No medium found" for any large iso9660 dvd's, but can mount
UDF disks no problem.

Steps to reproduce:

# Big iso9660 (4.0 Gb total)
$ mount /mnt/dvdburner/
mount: block device /dev/cdroms/cdrom0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/cdroms/cdrom0,
or too many mounted file systems

# Output from tail -f /var/log/kernel/current
Jan 21 10:29:05 [kernel] Unable to identify CD-ROM format.

###############################################

# Smaller iso9660 (3.3 Gb total)
$ mount /mnt/dvdburner/
mount: block device /dev/cdroms/cdrom0 is write-protected, mounting read-only

# Output from tail -f /var/log/kernel/current
Jan 21 10:32:12 [kernel] ISO 9660 Extensions: Microsoft Joliet Level 3
Jan 21 10:32:12 [kernel] ISO 9660 Extensions: RRIP_1991A

############################################### 

Both of these DVD's were made using growisofs, and the only difference I can see
is that they are of different size.
Please let me know if there is anything else I can do to further troubleshoot
this problem.
Thanks.
Comment 1 Andrew Morton 2004-01-21 16:34:28 UTC
This looks like an isofs problem, not IDE.

Could you please do:

  dd if=/dev/cdroms/cdrom0 of=iso.img bs=1M count=4

and compress and mail iso.img.gz to me?

Comment 2 Jeff Gardner 2004-01-21 17:33:23 UTC
I thought about filing it as an iso9660 bug, but the
disc won't mount with atapi drivers. It will mount
perfectly with scsi-emulation on the drive.
I dunno. Let me know what else I can do.
Thanks.
Comment 3 Jeff Gardner 2004-02-28 15:22:23 UTC
Created attachment 2242 [details]
dmesg for linux-2.6.3-ide

dmesg for 2.6.3. This kernel also fails to mount dvd's containing an iso9660
filesystem larger than (roughly) 3028 Mb.
Comment 4 Jeff Gardner 2004-02-28 15:29:05 UTC
Created attachment 2243 [details]
Commands used to burn iso discs.

After the first two burnings, I could still mount the dvd (~2.8 Gb) After the
third, (~4.2 Gb) I could no longer mount the dvd.
Comment 5 Jeff Gardner 2004-02-28 15:36:53 UTC
Created attachment 2244 [details]
Output from a few tests I made on 2 different dvd's and 2 different kernels.

It's interesting how ide capacity showed the same value for the large AND the
small dvd's.
Comment 6 Jeff Gardner 2004-02-28 15:39:32 UTC
Okay...
I've tried everything on 2.6.1, 2.6.2, and now 2.6.3. The only thing I've been
able to find out is that the cutoff for ide mounting of my iso9660 dvd's is
about 3028 Mb. I don't have the patience to narrow it any further than that. (by
burning REALLY small files starting around 2995 Mb) Who knows, maybe I'll get so
tired of rebooting that I'll eventually try it. :-)
If anybody has any ideas about what else I could do to trace the problem, I'll
be happy to try!!!!

Above are some of the results I've generated with help from Andrew and Jens.

Thanks, guys,
Jeff
Comment 7 Luca Tettamanti 2004-07-09 13:55:04 UTC
Hi,
I got the very same problem, Andy Polyakov made the following diagnosis:

--- begin ---
> I'm having a strange (at least for me) problem burning multisession
> DVD+R media: the dvd becomes unreadable after the 3rd session is burned.

I have all reasons to believe that it rather has everything to do with 
position of last session, than with the exact number of sessions. I also 
have all reasons to believe that it's rather ide-cd.c bug than isofs. In 
other words this problem was already reported to me, but I didn't have 
time to bring it up with linux-kernel people yet.

> mount refuses to do its work, and kernel says:
> 
> Unable to identify CD-ROM format.
> 
> Note that there isn't any read error, so the kernel is simply unable to
> locate the primary volume descriptor.

The keywords for this problem are:

> growisofs -M /dev/hdc -J -r <files> (-Z for the first session)
                     ^^^ ide-cd.c is involved [it's no problem with sr.c 
if unit is routed through ide-scsi.c]...

> This is the output of dvd+rw-mediainfo:
> ...
>  Multi-session Info:    #3@1339392
                              ^^^^^^^ ... and last recorded session 
starts beyond LBA #1152000, which corresponds ~2.2GB.

What's so special about 1152000 (besides that it reminds highest posible 
bitrate for serial port:-) It's 256 times 60 times 75. What's so special 
about these numbers? 256 is amount of interger values which can be 
represented with 8-bit number, 60 is amount of seconds in minute and 75 
is amount of frames in one second of CD-DA. Yes, it's about conversion 
from MSF to LBA suffering from overflow around 2.2GB. In the nutshell 
the problem is that drivers/ide/ide-cd.c always pull TOC in MSF format 
and then attempts to convert it to LBA. If last session is recorded 
beyond 1152000, isofs driver will be led by ide-cd driver to belief that 
volume descriptor resides at 1152000, which in turn results in "unable 
to identify CD-ROM format" message logged upon mount attempt.

As fast-acting remedy I can suggest to route your unit through ide-scsi. 
The way it was under 2.4. Even though it's declared unsupported it 
actually still works in 2.6 (I for one still use it). And once ide-cd.c 
is fixed you'll be able to revert back to officially recommended path. A.
--- end ---

So it's a bug in ide-cd.c

HTH,
Luca
Comment 8 Jeff Gardner 2004-07-09 14:05:08 UTC
Awesome!
Thanks for finding that...it has been awhile and I'm glad it wasn't just me.
Thanks Again,
Jeff (je_fro)
Comment 9 Luca Tettamanti 2004-12-11 10:38:20 UTC
*** Bug 3882 has been marked as a duplicate of this bug. ***
Comment 10 Luca Tettamanti 2004-12-18 09:39:56 UTC
Created attachment 4283 [details]
Fix for the bug

Patch against 2.6.9, applies with offset to 2.6.10-rc3.
Comment 11 Luca Tettamanti 2004-12-18 09:41:05 UTC
Patch has been sent to Linus and will show up in 2.6.10-rc4.
Comment 12 Jeff Gardner 2004-12-18 14:31:29 UTC
Yay!!!
It works...thank you Luca!

Here is some information you may find useful as well...

# dvd+rw-mediainfo /dev/hdc 
INQUIRY:                [LITE-ON ][DVDRW SOHW-1633S][BS0C]
GET [CURRENT] CONFIGURATION:
 Mounted Media:         1Ah, DVD+RW
 Media ID:              RICOHJPN/W11
 Current Write Speed:   4.0x1385=5540KB/s
 Write Speed #0:        4.0x1385=5540KB/s
GET [CURRENT] PERFORMANCE:
 Write Performance:     4.0x1385=5540KB/s@[0 -> 2295103]
 Speed Descriptor#0:    00/2295103 R@8.0x1385=11072KB/s W@4.0x1385=5540KB/s
READ DVD STRUCTURE[#0h]:
 Media Book Type:       92h, DVD+RW book [revision 2]
 Legacy lead-out at:    2295104*2KB=4700372992
READ DISC INFORMATION:
 Disc status:           complete
 Number of Sessions:    1
 State of Last Session: complete
 Number of Tracks:      1
 BG Format Status:      suspended
READ TRACK INFORMATION[#1]:
 Track State:           complete
 Track Start Address:   0*2KB
 Free Blocks:           0*2KB
 Track Size:            2295104*2KB
FABRICATED TOC:
 Track#1  :             14@0
 Track#AA :             14@2295104
 Multi-session Info:    #1@0
READ CAPACITY:          2295104*2048=4700372992

Note You need to log in before you can comment on or make changes to this bug.