dvd+rw-tools-5.15.4.8.5 and FreeBSD 5-current

Andy Polyakov appro at fy.chalmers.se
Tue Dec 23 12:37:54 PST 2003


Folks,

It was brought to my attention that growisofs, principal burning utility
from dvd+rw-tools, fails to fulfill DVD recording under FreeBSD
5-current. In the course of trouble-shooting it became apparent that the
failure is cased by kernel bug, reportedly introduced with "ATAng
commit." The kernel deficiency manifests itself by failure to
automatically pull sense data for failed ATAPI command, when application
most expects it to (as CAM_DIS_AUTOSENSE flag is *not* set). It was
possible to work around the bug by explicitly checking for
CAM_AUTOSNS_VALID status flag and "manually" pulling the sense data with
REQUEST SENSE command. Thanks to Pav Lucistnik <pav at FreeBSD.org> for
working with me on this. The workaround is incorporated to
dvd+rw-tools-5.15.4.8.5 update, which is available for immediate
download at usual location,
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/.

Even though workaround is available, it doesn't change the fact that
there is a kernel bug, which needs to be fixed. Well, one can argue if
it's a bug or feature, but the truth is that it doesn't affect
dvd+rw-tools only. Source code examination makes me conclude that at
least cd-write, cdrdao and cdrecord are affected as well. All three
apparently rely on kernel ability to pull sense data for failed command
automatically. One can wonder why it was not noticed and fixed so far?
ATAng is available for several months now, right? One possible
explanation might be that one can actually say that growisofs fails more
often. How come? There're few command MMC commands which come it two
flavors, "synchronous" and "immedidate." "Immediate" commands merely
initiate requested procedure and immediately return to requestor
(therefore the name:-), *implying* that requestor will periodically poll
the logical unit in order to find out when the requested procedure
actually finishes. Polling is normally done with TEST UNIT READY command
which is *bound* to fail while procedure in question progresses. Now the
catch is that unlike other programs dvd+rw-tools *extensively* use these
"immediate" commands in order to minimize the periods of IDE-bus
monopolization. So that in a sense one can say that growisofs is *bound*
to fail, yet it doesn't mean that recording was unsuccessful! Other
programs surely failed too, e.g. because of media defect, but such
failures are rare and intermittent and users could have silently
tolerated them as the problem just disappears if they retry.

Season greetings to everybody. A.


More information about the freebsd-ports mailing list