Bug 3882 - Burning a session beyond 2.2 Gig on a multisession DVD.
Summary: Burning a session beyond 2.2 Gig on a multisession DVD.
Status: REJECTED DUPLICATE of bug 1930
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Luca Tettamanti
URL:
Keywords:
: 3883 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-09 16:40 UTC by shensa
Modified: 2004-12-11 10:38 UTC (History)
0 users

See Also:
Kernel Version: 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 i686 i386 GNU/L
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description shensa 2004-12-09 16:40:19 UTC
Distribution:fedora core 2
Hardware Environment:SONY DVD RW DRU-710A and TEAC DVD+RW DV-W58E
Software Environment:
Problem Description:

When I burn multisession DVDs using growisofs, the dvd invariably becomes
unmountable when I create a session past 2.x Gigabytes (no problem in 
single session). Seems to be a problem with the TOC location in ide-cd. 
I think this problem  is best described by the note below which was 
posted in June.  (I have been unable to find any indication that this 
has been reported/patched even though the email below was CCd to
linux-kernel@vger.kernel.org. I apologize if I am wrong about this.) 
The problem can be quite annoying  if you are doing incremental backupsto 
dvd, since it limits each dvd to 2.2 Gig.

I have taken a look at ide-cd.c and I think the error lies in an overflow in
int msf_to_lba (byte m, byte s, byte f)
{
	return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET;
}

Another version of msf_to_lba which I found on the web may be a
solution, but I am not sufficently familiar with the transformation
to say.  At any rate 450150 is 31 * 150 which looks like a 
correction for an overflow in signed integers.  Perhaps another
solution would be to treat these as unsigned.

int msf_to_lba(int m, int s, int f)
{
	if (m < 90)
		return (m * 60 + s) * 75 + f - 150;
	else
		return (m * 60 + s) * 75 + f - 450150;
}

   --mark shensa

*Author: *Kronos <mailto:kronos@people.it>
*Date: * 
*To: *Andy Polyakov <mailto:appro@fy.chalmers.se>
*CC: *cdwrite <mailto:cdwrite@other.debian.org>, linux-kernel
<mailto:linux-kernel@vger.kernel.org>, Jens Axboe <mailto:axboe@suse.de>
*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



Steps to reproduce:  Burn multiple sessions on a dvd using growisofs. Problem 
occurs when previous session ended with more than 2.5 Gig on the dvd.
Comment 1 Andrew Morton 2004-12-09 17:18:48 UTC
ide-cd is deprecated and it's getting tempting to remove it from the tree.

You should tell whatever application you're using to address the IDE device
directly.  For example, `cdrecord -dev=/dev/hdc'
Comment 2 Andrew Morton 2004-12-09 17:48:18 UTC
oop, sorry, I misparsed.  ide-scsi is deprecated, not ide-cd.

There have been a few large-file isofs fixes since 2.6.5.  It might
be worth testing 2.6.10-rc3.
Comment 3 Dave Jones 2004-12-09 19:08:02 UTC
*** Bug 3883 has been marked as a duplicate of this bug. ***
Comment 4 Dave Jones 2004-12-09 19:11:14 UTC
2.6.5-1.358 looks like an old Fedora kernel.  You should really try the latest
2.6.9 kernel, as vast amounts of code have changed since then.
(up2date -fu kernel, or yum update kernel will do the trick)

(Normally I'd suggest closing Fedora/RH bugs filed here, and ask they move over
to bugzilla.redhat.com, but our kernels dont have any patches against the
relevant code mentioned here, so it probably belongs here).
Comment 5 Luca Tettamanti 2004-12-11 10:38:18 UTC

*** This bug has been marked as a duplicate of 1930 ***

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