All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: John Garry <john.g.garry@oracle.com>,
	axboe@kernel.dk, martin.petersen@oracle.com,
	James.Bottomley@HansenPartnership.com, hch@lst.de
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	himanshu.madhani@oracle.com
Subject: Re: [PATCH 2/2] scsi: bsg: Pass dev to blk_mq_alloc_queue()
Date: Fri, 24 May 2024 12:26:46 +0200	[thread overview]
Message-ID: <c61a2ccf-eade-480b-9495-86e9ae7bd6b4@suse.de> (raw)
In-Reply-To: <20240524084829.2132555-3-john.g.garry@oracle.com>

On 5/24/24 10:48, John Garry wrote:
> When calling bsg_setup_queue() -> blk_mq_alloc_queue(), we don't pass
> the dev as the queuedata, but rather manually set it afterwards. Just
> pass dev to blk_mq_alloc_queue() to have automatically set.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
>   block/bsg-lib.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/block/bsg-lib.c b/block/bsg-lib.c
> index ee738d129a9f..32da4a4429ce 100644
> --- a/block/bsg-lib.c
> +++ b/block/bsg-lib.c
> @@ -385,13 +385,12 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
>   	if (blk_mq_alloc_tag_set(set))
>   		goto out_tag_set;
>   
> -	q = blk_mq_alloc_queue(set, lim, NULL);
> +	q = blk_mq_alloc_queue(set, lim, dev);
>   	if (IS_ERR(q)) {
>   		ret = PTR_ERR(q);
>   		goto out_queue;
>   	}
>   
> -	q->queuedata = dev;
>   	blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT);
>   
>   	bset->bd = bsg_register_queue(q, dev, name, bsg_transport_sg_io_fn);

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

Cheers,

Hannes


  parent reply	other threads:[~2024-05-24 10:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24  8:48 [PATCH 0/2] block, scsi: Small improvements for blk_mq_alloc_queue() usage John Garry
2024-05-24  8:48 ` [PATCH 1/2] scsi: core: Pass sdev to blk_mq_alloc_queue() John Garry
2024-05-24  9:38   ` Christoph Hellwig
2024-05-24 10:26   ` Hannes Reinecke
2024-06-11  6:21   ` Hannes Reinecke
2024-05-24  8:48 ` [PATCH 2/2] scsi: bsg: Pass dev " John Garry
2024-05-24  9:38   ` Christoph Hellwig
2024-05-24 10:26   ` Hannes Reinecke [this message]
2024-05-29 20:30 ` [PATCH 0/2] block, scsi: Small improvements for blk_mq_alloc_queue() usage Himanshu Madhani
2024-05-31  0:23 ` Martin K. Petersen
2024-06-05  2:32 ` Martin K. Petersen

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=c61a2ccf-eade-480b-9495-86e9ae7bd6b4@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=himanshu.madhani@oracle.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --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.