Bug 2860

Summary: CD label should be read from actual session
Product: hal Reporter: Stanislav Brabec <sbrabec>
Component: haldAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: high CC: kay
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Stanislav Brabec 2005-03-30 04:40:44 UTC
When mounting multi-session CD, CD label should be read from last (actual)
session, not first one.

How to repeat: Take a CD-RW, create a multi-session CD with any contents, use -V
parameter for mkisofs. Create another session using different -V.

Current behavior: CD label is read from first session

Expected behavior: CD label is read from last session
Comment 1 Stanislav Brabec 2005-03-30 04:45:41 UTC
Tested on hal-0.4.7, SuSE Linux 9.3 x86_64.
Comment 2 David Zeuthen (not reading bugmail) 2005-03-30 08:13:25 UTC
(I've sent a may to Kay Sievers so he can add him as Cc since Bugzilla wont let
me do that for some reason)

Yeah, that should probably be fixed in volume_id; Kay, any idea how difficult
this is to fix?

Long term, we should probably expose all the sessions (and partitions within) of
the CD as device objects in hal and make fstab-sync (or other tools, such as
pmount) do the right thing for adding fstab entries / mounting the filesystem.
Unfortunately, the kernel doesn't expose these, but we can still do it all from
user space.
Comment 3 Stanislav Brabec 2005-03-30 08:53:35 UTC
Related bug:
http://bugzilla.gnome.org/show_bug.cgi?id=99621

util-linux also has a heuristics to find continuation session (to be able to
mount CD-Extra data track).

There is not probable, that there will be partitions in sessions (because TOC of
session often refers files with previous sessions). Normal behavior is mounting
last session. Imagine multi-session CD as block media with unreadable blocks
between sessions and a special block - TOC, which says, where you should search
sessions.

It is possible to create multiple mount points, if you insert multi-session CD,
all with the same device node, but for old sessions with additional
session=number in mount options. But it must be done in a user-friendly way (but
mount point structure must be usable, if user wants mount points named as volume
label and label is different in old sessions).

Special case is be CD-Extra - audio tracks can be mounted as CDDA or played by
audio CD player, but data track can be mounted as data. It is not sure, what
label should be used for such media - data track ISO9660 volume id or Album
title from CDDB.
Comment 4 Kay Sievers 2005-03-30 09:55:20 UTC
> When mounting multi-session CD, CD label should be read from last
> (actual) session, not first one.

Good point. We sould do something here.

> Yeah, that should probably be fixed in volume_id; Kay, any idea how difficult
> this is to fix?

That's a mess with all the CD formats. But if we decide what exactly we want
to be supported, I will try to do that, sure.

Btw: UDF can have partitons along with sessions too. Apple uses HFS, and
partitions too. We need to set a limit here. :)
Comment 5 Kay Sievers 2005-04-06 12:52:02 UTC
We probe the last session from an optical disk now. This should work much
better and is probably the expected behavior in most cases.

http://cvs.freedesktop.org/hal/hal/hald/linux2/probing/probe-volume.c?r1=1.6&r2=1.7

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.