[systemd-bugs] [Bug 52474] cdrom_id probing and USB Flash Drive CDROMs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 25 14:01:37 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52474

David Zeuthen <zeuthen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|zeuthen at gmail.com           |systemd-bugs at lists.freedesk
                   |                            |top.org
          QAContact|                            |systemd-bugs at lists.freedesk
                   |                            |top.org
            Summary|udisks behavior with USB    |cdrom_id probing and USB
                   |Flash Drive CDROMs          |Flash Drive CDROMs
            Product|udisks                      |systemd
          Component|detection                   |general

--- Comment #13 from David Zeuthen <zeuthen at gmail.com> 2012-07-25 14:01:37 PDT ---
First of all, I've seen this problem with Sandisk Cruzer USB sticks as well.

It's actually not a udisks problem - from comment 9 you can see that the ID_FS*
properties are not set in the udev database.

So why's that? It's because blkid never runs on the device. Why? Because of
this udev rule

 KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*",  \
   ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*",  \
   ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
   IMPORT{builtin}="blkid --noraid"

in /lib/udev/rules.d/60-persistent-storage.rules. As you can see from comment
9, ID_CDROM_MEDIA_TRACK_COUNT_DATA is not set.

But why do we require ID_CDROM_MEDIA_TRACK_COUNT_DATA to be set? Because some
optical discs may not have data on them (they may have audio) and we don't want
to read data from such discs (it causes the sr driver to spew errors).

As I said, I have the same "problem" with my Sandisk Cruzer USB stick, see

 # /lib/udev/cdrom_id /dev/sr1
 ID_CDROM=1
 ID_CDROM_CD_R=1
 ID_CDROM_MRW=1
 ID_CDROM_MRW_W=1
 ID_CDROM_MEDIA=1

that also lacks the ID_CDROM_MEDIA_TRACK_COUNT_DATA property. (Only it's not
really a problem as the "CD-ROM" only has Windows drivers/apps on it which are
pretty useless on Linux anyway.)

So this is either a) a bug in cdrom_id; or b) a firwmare bug in the device. I
think it's the latter... maybe cdrom_id can add a workaround/quirk, I don't
don't.

Either way it's not a udisks bug... I'm reassigning to systemd (and fixing up
the bug title) since that's where udev lives nowadays. Kay: any thoughts on
this?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the systemd-bugs mailing list