public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: questions on details of sg_ioctl
Date: Tue, 13 Nov 2007 10:00:16 -0600	[thread overview]
Message-ID: <4739CA10.6080601@nortel.com> (raw)


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

                 reply	other threads:[~2007-11-13 16:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4739CA10.6080601@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox