All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-scsi@vger.kernel.org,
	"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: Re: [PATCH v3 40/51] scsi_debug: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
Date: Tue, 25 May 2021 12:19:29 -0400	[thread overview]
Message-ID: <b7b1bc48-9c5e-f2e2-1af6-e2d5eb3ad0af@interlog.com> (raw)
In-Reply-To: <20210524030856.2824-41-bvanassche@acm.org>

On 2021-05-23 11:08 p.m., Bart Van Assche wrote:
> Prepare for removal of the request pointer by using scsi_cmd_to_rq()
> instead. This patch does not change any functionality.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Acked-by: Douglas Gilbert <dgilbert@interlog.com>

> ---
>   drivers/scsi/scsi_debug.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index 6e2ad003c179..151b0d2f49a5 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -4705,7 +4705,7 @@ static int resp_rwp_zone(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
>   static struct sdebug_queue *get_queue(struct scsi_cmnd *cmnd)
>   {
>   	u16 hwq;
> -	u32 tag = blk_mq_unique_tag(cmnd->request);
> +	u32 tag = blk_mq_unique_tag(scsi_cmd_to_rq(cmnd));
>   
>   	hwq = blk_mq_unique_tag_to_hwq(tag);
>   
> @@ -4718,7 +4718,7 @@ static struct sdebug_queue *get_queue(struct scsi_cmnd *cmnd)
>   
>   static u32 get_tag(struct scsi_cmnd *cmnd)
>   {
> -	return blk_mq_unique_tag(cmnd->request);
> +	return blk_mq_unique_tag(scsi_cmd_to_rq(cmnd));
>   }
>   
>   /* Queued (deferred) command completions converge here. */
> @@ -5367,7 +5367,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
>   {
>   	bool new_sd_dp;
>   	bool inject = false;
> -	bool hipri = (cmnd->request->cmd_flags & REQ_HIPRI);
> +	bool hipri = scsi_cmd_to_rq(cmnd)->cmd_flags & REQ_HIPRI;
>   	int k, num_in_q, qdepth;
>   	unsigned long iflags;
>   	u64 ns_from_boot = 0;
> @@ -5570,8 +5570,9 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
>   		if (sdebug_statistics)
>   			sd_dp->issuing_cpu = raw_smp_processor_id();
>   		if (unlikely(sd_dp->aborted)) {
> -			sdev_printk(KERN_INFO, sdp, "abort request tag %d\n", cmnd->request->tag);
> -			blk_abort_request(cmnd->request);
> +			sdev_printk(KERN_INFO, sdp, "abort request tag %d\n",
> +				    scsi_cmd_to_rq(cmnd)->tag);
> +			blk_abort_request(scsi_cmd_to_rq(cmnd));
>   			atomic_set(&sdeb_inject_pending, 0);
>   			sd_dp->aborted = false;
>   		}
> @@ -7397,7 +7398,7 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost,
>   					       (u32)cmd[k]);
>   		}
>   		sdev_printk(KERN_INFO, sdp, "%s: tag=%#x, cmd %s\n", my_name,
> -			    blk_mq_unique_tag(scp->request), b);
> +			    blk_mq_unique_tag(scsi_cmd_to_rq(scp)), b);
>   	}
>   	if (unlikely(inject_now && (sdebug_opts & SDEBUG_OPT_HOST_BUSY)))
>   		return SCSI_MLQUEUE_HOST_BUSY;
> 


  reply	other threads:[~2021-05-25 16:19 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  3:08 [PATCH v3 00/51] Remove the request pointer from struct scsi_cmnd Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 01/51] core: Introduce the scsi_cmd_to_rq() function Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 02/51] core: Use scsi_cmd_to_rq() instead of scsi_cmnd.request Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 03/51] sd: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 04/51] sr: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 05/51] scsi_transport_fc: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 06/51] scsi_transport_spi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 07/51] ata: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 08/51] RDMA/iser: " Bart Van Assche
2021-05-24  8:46   ` Max Gurtovoy
2021-05-24  3:08 ` [PATCH v3 09/51] RDMA/srp: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 10/51] zfcp: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 11/51] 53c700: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 12/51] NCR5380: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 13/51] aacraid: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 14/51] advansys: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 15/51] aha1542: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 16/51] bnx2i: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 17/51] csiostor: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 18/51] cxlflash: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 19/51] dpt_i2o: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 20/51] fnic: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 21/51] hisi_sas: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 22/51] hpsa: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 23/51] ibmvfc: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 24/51] ibmvscsi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 25/51] ips: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 26/51] libsas: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 27/51] lpfc: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 28/51] megaraid: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 29/51] mpt3sas: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 30/51] mvumi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 31/51] myrb: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 32/51] myrs: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 33/51] ncr53c8xx: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 34/51] qedf: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 35/51] qedi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 36/51] qla1280: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 37/51] qla2xxx: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 38/51] qla4xxx: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 39/51] qlogicpti: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 40/51] scsi_debug: " Bart Van Assche
2021-05-25 16:19   ` Douglas Gilbert [this message]
2021-05-24  3:08 ` [PATCH v3 41/51] smartpqi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 42/51] snic: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 43/51] stex: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 44/51] sun3_scsi: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 45/51] sym53c8xx: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 46/51] ufs: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 47/51] virtio_scsi: " Bart Van Assche
2021-05-24  9:23   ` Michael S. Tsirkin
2021-05-24  3:08 ` [PATCH v3 48/51] xen-scsifront: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 49/51] tcm_loop: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 50/51] usb-storage: " Bart Van Assche
2021-05-24  3:08 ` [PATCH v3 51/51] core: Remove the request member from struct scsi_cmnd Bart Van Assche

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=b7b1bc48-9c5e-f2e2-1af6-e2d5eb3ad0af@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.