Hi One and all, Apologies if this is the wrong place/list. My first attempt into kernel level programming.
First a little overview of what I'm attempting: I have used 'scsi-debug' as a basis for a pseudo SCSI Tape/Library. i.e. - It registers a couple of tape devices and a library with the operating system. - It also registers a char device. - A user space daemon reads/writes data via the char device interface for SCSI write/reads via the /dev/st, /dev/sg.... While it is in a very rough state, I do have basic functionality there. I can 'tar cvf /dev/st0 /etc/motd' & 'tar tvf /dev/st0' OK. My problem is when I attempt to pump more data thru, I get a kernel deadlock/freeze. The system freeze is not consistent. Sometimes I can back up all of /etc. Other times it freezes after a couple of files. Q. Any suggestions on the best way to go about determining what/where would be causing the lockup ? More details: I've implemented a 'variable block SCSI write/read' commands. resp_read_ssc() & resp_write_ssc() using the scsi-debug's resp_read()/resp_write() as a basis. I'm using the kfifo introduced in 2.6.10 as by fifo. i.e. Data written to the char device -> kfifo -> resp_read_ssc() Data read from the char device <- kfifo -< resp_write_ssc() As a test, I've read/written many megabytes of data from user space to/from fifo via the char device interface with no lockup or indication of memory leaks (that I can detect). I do not really understand what is occurring in 'fill_from_dev_buffer()/fetch_to_dev_buffer()' routines. I also do not understand what 'Rusty Russel refers to as being in user context (Unreliable Guide to Hacking the Linux kernel)' Chapter 5: Recipes for Deadlock. Any assistance and/or guidance welcome. Regards Mark Harvey - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

