public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Martin Wilck <mwilck@suse.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Douglas Gilbert <dgilbert@interlog.com>,
	Hannes Reinecke <hare@suse.de>,
	James Bottomley <jejb@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2] scsi_debug: call resp_*() function after setting host_scribble
Date: Thu, 15 Feb 2018 18:41:24 -0500	[thread overview]
Message-ID: <yq1k1vdlt23.fsf@oracle.com> (raw)
In-Reply-To: <20180214100557.30717-1-mwilck@suse.com> (Martin Wilck's message of "Wed, 14 Feb 2018 11:05:57 +0100")


Martin,

Applied to 4.17/scsi-queue.

Minor patch submission nits below (for next time, I fixed them up).

> Error injection in scsi_debug (e.g. opts=16, SDEBUG_OPT_TRANSPORT_ERR)
> currently doesn't work correctly because the test for sqcp in
> resp_read_dt0() and similar resp_*() functions always fails.  sqcp is
> set from cmnd->host_scribble, which is set in schedule_resp(), which
> is called from scsi_debug_queuecommand() after calling the resp_*
> function.
>
> Defer calling resp_*() until after cmnd->host_scribble is
> set in schedule_resp().
>
> Fixes: c483739430f1 "scsi_debug: add multiple queue support"

Your Signed-off-by: needs to go here. And then you need a "---"
separator before the change log.

> Changes in v2: Adapted to code changes after 80c49563e250
> 	"scsi: scsi_debug: implement IMMED bit"
>
> Notes about this adaptation:
>
> The "flags &= ~F_LONG_DELAY" statement in scsi_debug_queuecommand()
> from 80c49563e250 had no effect. Dropped it.
> Because we call the resp_*() function later now, the code flow in
> schedule_resp() is slightly different now for the IMMED case - instead of
> falling through to the "respond_in_thread" label immediately, the command will
> be put in the work queue with zero delay.
>
> Signed-off-by: Martin Wilck <mwilck@suse.com>

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2018-02-15 23:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 10:05 [PATCH v2] scsi_debug: call resp_*() function after setting host_scribble Martin Wilck
2018-02-15 14:26 ` Douglas Gilbert
2018-02-15 23:42   ` Martin K. Petersen
2018-02-15 23:41 ` Martin K. Petersen [this message]

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=yq1k1vdlt23.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=dgilbert@interlog.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mwilck@suse.com \
    /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