Bug 91572 - [atapicam] [panic] writing to UFS/softupdates DVD media using atapicam
Summary: [atapicam] [panic] writing to UFS/softupdates DVD media using atapicam
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 22:20 UTC by Simun Mikecin
Modified: 2015-11-10 13:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simun Mikecin 2006-01-09 22:20:02 UTC
Using virgin DVD+RW media in DVD writer drive with UFS2 filesystem on it.

Tested scenarios:

a) softupdates enabled, using /dev/cd1 (atapicam)
Writing files to mounted filesystem causes panic:
panic: initiate_write_inodeblock_ufs2: already_started

b) softupdates disabled, using /dev/cd1 (atapicam)
No panic occurs, writing to media works as expected.

c) softupdates enabled, using /dev/acd1
No panic occurs, writing to media works as expected.

This problem is probably related to kern/91568, cause in both cases problem
occurs only when softupdates are enabled.

Also worth mentioning: during writing to /dev/cd1 (atapicam) there is a
bunch of messages on the console:
Jan  9 20:02:12 data kernel: g_vfs_done():cd1[WRITE(offset=3691495424, length=131072)]error = 5
Jan  9 20:02:12 data kernel: g_vfs_done():cd1[WRITE(offset=3690577920, length=131072)]error = 5
Jan  9 20:02:31 data kernel: (cd1:ata1:0:0:0): WRITE(10). CDB: 2a 0 0 1b 87 30 0 0 20 0
Jan  9 20:02:31 data kernel: (cd1:ata1:0:0:0): Logical unit not ready, long write in progress

Fix: 

Don't use atapicam for ATA drives. Not sure how real SCSI drives would behave.
How-To-Repeat: Using DVD+RW media and dvd+rw-format from sysutils/dvd+rw-tools:

dvd+rw-format /dev/cd1
newfs_ufs -U /dev/cd1
mount -o noatime /dev/cd1 /mnt/1
cp -pRv /some/files/ /mnt/1/
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 13:42:13 UTC
atapicam is no more after FreeBSD 9.x. Long live atacam and friends.