2004-06-23 19:28:57

by Luca Tettamanti

[permalink] [raw]
Subject: [ISOFS] Troubles with multi session DVDs.

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

That happened with 3 different disks (and different data, though
sessions size were similar). DVD were burned with growisofs (5.19.4.9.7)
using the following command:

growisofs -M /dev/hdc -J -r <files> (-Z for the first session)

mkisofs version is 2.01a29.

I don't think that the problem is related to the inode wrap after 4GB
because:
* The 1st and 2nd sessions took about 2.6GB, the last was 1.8GB so
directories should be before the 4GB boundary.
* I tried the patch from Paul Serice without success.

This is the output of dvd+rw-mediainfo:

INQUIRY: [_NEC ][DVD_RW ND-1300A ][1.0A]
GET [CURRENT] CONFIGURATION:
Mounted Media: 1Bh, DVD+R
GET [CURRENT] PERFORMANCE:
Write Performance: 3.9x1385=5408KB/s@[0 -> 2295104]
Speed Descriptor#0: 00/2295104 [email protected]=10816KB/s [email protected]=5408KB/s
Speed Descriptor#1: 00/2295104 [email protected]=10816KB/s [email protected]=3245KB/s
READ DVD STRUCTURE[#0h]:
Media Book Type: A1h, DVD+R book [revision 1]
Media ID: RICOHJPN/R01
Legacy lead-out at: 2295104*2KB=4700372992
READ DISC INFORMATION:
Disc status: appendable
Number of Sessions: 4
State of Last Session: empty
"Next" Track: 4
Number of Tracks: 4
READ TRACK INFORMATION[#1]:
Track State: partial
Track Start Address: 0*2KB
Free Blocks: 0*2KB
Track Size: 899648*2KB
READ TRACK INFORMATION[#2]:
Track State: partial
Track Start Address: 901696*2KB
Free Blocks: 0*2KB
Track Size: 435648*2KB
READ TRACK INFORMATION[#3]:
Track State: partial
Track Start Address: 1339392*2KB
Free Blocks: 0*2KB
Track Size: 896000*2KB
READ TRACK INFORMATION[#4]:
Track State: blank
Track Start Address: 2237440*2KB
Next Writable Address: 2237440*2KB
Free Blocks: 57664*2KB
Track Size: 57664*2KB
FABRICATED TOC:
Track#1 : 17@0
Track#2 : 17@901696
Track#3 : 17@1339392
Track#AA : 17@2235392
Multi-session Info: #3@1339392

Same dvd, TOC dumped with cdrecord-prodvd:

WARNING: Phys disk size 2295104 differs from rzone size 899648! Prerecorded disk?
WARNING: Phys start: 196608 Phys end 2491711
first: 1 last 3
track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 7 mode: -1
track: 2 lba: 901696 ( 3606784) -56:24:46 adr: 1 control: 7 mode: -1
track: 3 lba: 1339392 ( 5357568) -1:59:74 adr: 1 control: 7 mode: -1
track:lout lba: 2235392 ( 8941568) -1:59:74 adr: 1 control: 7 mode: -1

Note that I get similar warnings for the other DVDs.

Kernel is 2.6.6 (and 2.6.7 for the last dvd), DMA is on for both the HD
and the DVD recorder. Also I don't have any problem filling the DVD in
one session.

The "other" OS is able to read the disk, so this may be a problem in the
isofs code (that's why I put lkml on CC).

Any idea of what's going on?

thanks,
Luca
PS: cc me, I'm not subscribed.
--
Home: http://kronoz.cjb.net
La vasca da bagno fu inventata nel 1850, il telefono nel 1875.
Se fossi vissuto nel 1850, avrei potuto restare in vasca per 25 anni
senza sentir squillare il telefono


2004-06-26 18:52:13

by Andy Polyakov

[permalink] [raw]
Subject: Re: [ISOFS] Troubles with multi session DVDs.

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


2004-06-26 21:31:53

by Luca Tettamanti

[permalink] [raw]
Subject: Re: [ISOFS] Troubles with multi session DVDs.

Il Sat, Jun 26, 2004 at 08:52:27PM +0200, Andy Polyakov ha scritto:
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> >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.

Yes, I can confirm that with ide-scsi I can read the dvd without
problems.

Jens are you aware of this bug in ide-cd?

Luca
--
Home: http://kronoz.cjb.net
"Su cio` di cui non si puo` parlare e` bene tacere".
Ludwig Wittgenstein