Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Sep 2001 00:57:12 -0700
From:      Farooq Mela <fmela0@sm.socccd.cc.ca.us>
To:        FreeBSD-Hackers@FreeBSD.ORG
Cc:        sos@FreeBSD.ORG
Subject:   Failure to fixate cd in burncd
Message-ID:  <3B9B20D8.5393D4E@sm.socccd.cc.ca.us>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------2C67590429291780833B3BCB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

Sometimes when I burn data CD's from ISO's at 12x speed like so:

# burncd -f /dev/acd1c -s 12 data file.iso fixate

The fixate fails, and I believe it is because the CD-R has not yet
spun down from the burn phase.  The problem doesn't occur when the
burn is done at a lower speed.  The fixate works perfectly if,
immediately after the 12x speed burn, I then do "burncd -f /dev/acd1c
-s 12 fixate," because then the CD-R has stopped doing the burning
phase.  I don't know that much about ATA or anything, but I have
attached a patch for burncd (against -STABLE) which will perhaps fix
the problem (it does for me at least).  It just retries the
CDRIOCCLOSEDISK ioctl (which is the ioctl that fails) a few times,
with pauses in between.  Any thoughts?

BTW, don't EVER try mounting a CD that has an .iso image burned to it
but hasn't been fixated.  There is a fatal kernel trap, and then
somewhere in the code that handles kernel traps, there is another
fatal trap, so there is a continuous barrage of kernel trap messages
and information; these go on indefinitely until you press a key.

-- 
farooq <fmela0@sm.socccd.cc.ca.us>
--------------2C67590429291780833B3BCB
Content-Type: text/plain; charset=us-ascii;
 name="burncd.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="burncd.txt"

--- /usr/src/usr.sbin/burncd/burncd.c	Sat Mar  3 23:59:34 2001
+++ burncd.c	Sun Sep  9 00:47:25 2001
@@ -118,9 +118,16 @@
 
 	for (arg = 0; arg < argc; arg++) {
 		if (!strcmp(argv[arg], "fixate")) {
+			int retries;
+
 			if (!quiet)
 				fprintf(stderr, "fixating CD, please wait..\n");
-			if (ioctl(fd, CDRIOCCLOSEDISK, &multi) < 0)
+			for (retries = 5; retries; retries--) {
+				if (ioctl(fd, CDRIOCCLOSEDISK, &multi) == 0)
+					break;
+				usleep(100000);
+			}
+			if (retries == 0)
         			err(EX_IOERR, "ioctl(CDRIOCCLOSEDISK)");
 			break;
 		}

--------------2C67590429291780833B3BCB--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B9B20D8.5393D4E>