All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag
Date: Sat, 10 Nov 2018 13:56:13 +0100	[thread overview]
Message-ID: <913fa7d5-7e3b-6a1e-0306-7d89b304a125@suse.de> (raw)
In-Reply-To: <20181109183208.19879-2-hch@lst.de>

On 11/9/18 7:32 PM, Christoph Hellwig wrote:
> They way these functions abuse ->special to try to store the dummy
> request looks completely broken, given that it actually stores the
> original scsi command.
> 
> Instead switch to ->host_scribble and store the actual dummy command.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/fnic/fnic_scsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
> index 96acfcecd540..cafbcfb85bfa 100644
> --- a/drivers/scsi/fnic/fnic_scsi.c
> +++ b/drivers/scsi/fnic/fnic_scsi.c
> @@ -2274,7 +2274,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
>  		return SCSI_NO_TAG;
>  
>  	sc->tag = sc->request->tag = dummy->tag;
> -	sc->request->special = sc;
> +	sc->host_scribble = (unsigned char *)dummy;
>  
>  	return dummy->tag;
>  }
> @@ -2286,7 +2286,7 @@ fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
>  static inline void
>  fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc)
>  {
> -	struct request *dummy = sc->request->special;
> +	struct request *dummy = (struct request *)sc->host_scribble;
>  
>  	blk_mq_free_request(dummy);
>  }
> 
The entire device_reset for fnic should be redone; which reminds me to
redo my scsi-eh rework rebased.

But until then:

Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2018-11-10 12:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 18:32 remove most req->special users Christoph Hellwig
2018-11-09 18:32 ` [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag Christoph Hellwig
2018-11-10 12:56   ` Hannes Reinecke [this message]
2018-11-09 18:32 ` [PATCH 2/6] nullb: remove leftover legacy request code Christoph Hellwig
2018-11-10 12:56   ` Hannes Reinecke
2018-11-09 18:32 ` [PATCH 3/6] skd_main: don't use req->special Christoph Hellwig
2018-11-09 19:09   ` Bart Van Assche
2018-11-10 12:57   ` Hannes Reinecke
2018-11-09 18:32 ` [PATCH 4/6] aoe: replace ->special use with private data in the request Christoph Hellwig
2018-11-10 12:58   ` Hannes Reinecke
2018-11-09 18:32 ` [PATCH 5/6] pd: " Christoph Hellwig
2018-11-10 12:58   ` Hannes Reinecke
2018-11-09 18:32 ` [PATCH 6/6] ide: don't use req->special Christoph Hellwig
2018-11-10 12:59   ` Hannes Reinecke
2018-11-09 22:47 ` remove most req->special users Jens Axboe
2018-11-10  8:30 remove most req->special users v2 Christoph Hellwig
2018-11-10  8:30 ` [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag Christoph Hellwig

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=913fa7d5-7e3b-6a1e-0306-7d89b304a125@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.