[mythtv-commits] Ticket #1257: cdrom detection causing 10 second delay in mythplugin_init

MythTV mythtv at cvs.mythtv.org
Fri Feb 10 23:46:18 UTC 2006


#1257: cdrom detection causing 10 second delay in mythplugin_init
---------------------------------+------------------------------------------
 Reporter:  russelb at clemson.edu  |       Owner:  ijr 
     Type:  patch                |      Status:  new 
 Priority:  minor                |   Milestone:      
Component:  mythmusic            |     Version:  head
 Severity:  medium               |  
---------------------------------+------------------------------------------
 After installing mythmusic, I noticed that it was taking mythmusic about
 10 seconds to intialize.  I inserted some time difference calculations
 throughout the code to track it down and found that it was
 CDWriterDevice() in globalsettings.cpp.

 It is the execution of "cdrecord --scanbus -dev=ATA" that is blocking for
 me.  When executing it from the command line, I see the following output:
 (Note that /dev/hdb is one of my hard drives)

 Warning: Using badly designed ATAPI via /dev/hd* interface.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 Error trying to open /dev/hdb exclusively (Device or resource busy)...
 retrying in 1 second.
 cdrecord: Device or resource busy. Cannot open '/dev/hdb'. Cannot open
 SCSI driver.


 Changing "ATA" to "ATAPI" in the arguments to cdrecord, as shown in the
 patch, gets rid of this problem for me.  Furthermore, this change allows
 my cdrw drive to be detected, while it was not detected before.

 I do not have sufficient knowlege about the difference between "-dev=ATA"
 and "-dev=ATAPI" to know the whole story behind this change.  Hopefuly
 someone with more knowlege in the area can help shed some light on the
 topic.

 I am also available on irc.freenode.net as "drumkilla".

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1257>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list