I am really stuck. I'm using the /dev/sg driver in cooperation with the
/dev/st driver.
I am using fwrite to the /dev/st device to write data to a tape. Every 10
seconds, the same task, uses /dev/sg to request a LOG SENSE. I'm trying to
monitor the data compression statistics, as well as the tape capacity pages.
(Pages 0x39 and 0x31 and 0x07).

When I fwrite to the /dev/sg. The task hangs and the SCSI bus is screwed up.
I cannot kill -9 the task. Looking at ps, it appears WCHAN is stuck in
scsi_allocate_device(). (It says scsi_a, I'm assuming its allocate_device
from looking at the sg code).

I have to reboot my system and suffer a long and excruciating fsck each
time.

Here is the odd thing. When I am using /dev/st RD_ONLY, I dont have this
problem. I use the same routines to read the log pages and they work fine.
It appears this is only happening with I'm using /dev/st WR_ONLY.

Any ideas? Suggestions? How would I even debug something like this? 
I might try seeing if I can not use /dev/sg and issue the same command vi
/dev/st deprecated ioctl. But my task will have to be root for that. I am
trying to use /dev/sg.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to