linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* questions on details of sg_ioctl
@ 2007-11-13 16:00 Chris Friesen
  0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2007-11-13 16:00 UTC (permalink / raw)
  To: linux-scsi, linux-kernel


Suppose I send down an SG_IO command on a generic scsi device node.  As 
far as I can tell, the code path looks like this in 2.6.14:

sg_ioctl
	sg_new_write
		scsi_execute_async (sets up sg_cmd_done as callback)
			scsi_do_req
				scsi_insert_special_req
					blk_insert_request

and like this in 2.6.23:
sg_ioctl
	sg_new_write
		scsi_execute_async (sets up sg_cmd_done as callback)
			blk_execute_rq_nowait


At this point, is that request queued along with all the other commands, 
or is it injected immediately to the device?  If it is queued up along 
with all the other commands, shouldn't the return path feed into the 
queue length calculations if we get BUSY/TASK_SET_FULL?

Also, for the purposes of the device returning TASK_SET_FULL vs BUSY, 
does each userspace process count as a SCSI initiator port, or are they 
all sort of grouped together?  (The reason I ask is that we're getting 
TASK_SET_FULL errors but according to SAM-3 that should only happen if 
we already have at least one outstanding request.)

Thanks,

Chris

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-13 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 16:00 questions on details of sg_ioctl Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).