Bug 128249 - cdrecord should use O_EXCL
cdrecord should use O_EXCL
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: cdrtools (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
:
: 132756 (view as bug list)
Depends On:
Blocks: FC3Target
  Show dependency treegraph
 
Reported: 2004-07-20 16:21 EDT by David Zeuthen
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-22 07:59:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Zeuthen 2004-07-20 16:21:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040706 Firefox/0.9.1

Description of problem:
cdrecord doesn't open the CD device with O_EXCL. This is bad since
O_EXCL is used to lock other disc media detection programs that poll
for media out. Such as magicdev or hal.

My impression is that on some drives this doesn't matter but on a
select few it does result in bad burns. 

O_EXCL is in mainline 2.6.


Version-Release number of selected component (if applicable):
cdrecord-2.01.0.a33-1

How reproducible:
Always

Steps to Reproduce:
[david@ixus david]$ strace cdrecord -v speed=2 dev=/dev/hdc
FC2-test1-i386-disc4.iso > cdout 2>&1
[david@ixus david]$ cat cdout |grep "open(\"/dev/hdc"
open("/dev/hdc", O_RDWR|O_NONBLOCK)     = 3


Actual Results:  I burned a CD and using strace I saw that the device
was opened with O_EXCL

Expected Results:  cdrecord should open the device
O_RDRW|O_NONBLOCK|O_EXCL instead.

Additional info:
Comment 1 Bastien Nocera 2004-07-20 18:30:35 EDT
It had the patch modified in version 8:2.0-8, but there's no mention
of it being removed in subsequent versions.
Comment 2 Harald Hoyer 2004-09-03 06:23:50 EDT
this patch is really hard to do with all the new device layers...
cdrecord opens _ALL_ cdroms for its pseudo scsi-bus-mapping and then
uses the fd for the appropriate device...

I patched growisofs to do the right thing... but cdrecord needs more
hours of thinking this through :-/
Comment 3 Harald Hoyer 2004-09-16 14:54:17 EDT
*** Bug 132756 has been marked as a duplicate of this bug. ***
Comment 4 Harald Hoyer 2004-09-22 07:59:38 EDT
done for the case where you directly specify the device per devnode.
e.g. dev=/dev/cdrom

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