* [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map
@ 2019-03-12 1:31 Dongli Zhang
2019-04-08 14:00 ` Dongli Zhang
2019-04-08 14:08 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Dongli Zhang @ 2019-03-12 1:31 UTC (permalink / raw)
To: virtualization, linux-block, linux-kernel; +Cc: axboe, mst
Use HCTX_TYPE_DEFAULT instead of 0 to avoid hardcoding.
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
This is the only place to cleanup under drivers/block/*. Another patch set
is sent to scsi and then all of below are cleaned up:
- block/*
- drivers/*
drivers/block/virtio_blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 4bc083b..bed6035 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -691,7 +691,8 @@ static int virtblk_map_queues(struct blk_mq_tag_set *set)
{
struct virtio_blk *vblk = set->driver_data;
- return blk_mq_virtio_map_queues(&set->map[0], vblk->vdev, 0);
+ return blk_mq_virtio_map_queues(&set->map[HCTX_TYPE_DEFAULT],
+ vblk->vdev, 0);
}
#ifdef CONFIG_VIRTIO_BLK_SCSI
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map
2019-03-12 1:31 [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map Dongli Zhang
@ 2019-04-08 14:00 ` Dongli Zhang
2019-04-08 14:08 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Dongli Zhang @ 2019-04-08 14:00 UTC (permalink / raw)
To: virtualization, linux-block, linux-kernel; +Cc: axboe, mst
ping?
The similar patchset has been queued by linux-scsi 5.2/scsi-queue.
virtio-blk is the last place where HCTX_TYPE_DEFAULT is hardcoded.
It would be more friendly to cscope if the hardcoding is avoided.
Thank you very much!
Dongli Zhang
On 03/12/2019 09:31 AM, Dongli Zhang wrote:
> Use HCTX_TYPE_DEFAULT instead of 0 to avoid hardcoding.
>
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
> This is the only place to cleanup under drivers/block/*. Another patch set
> is sent to scsi and then all of below are cleaned up:
> - block/*
> - drivers/*
>
> drivers/block/virtio_blk.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 4bc083b..bed6035 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -691,7 +691,8 @@ static int virtblk_map_queues(struct blk_mq_tag_set *set)
> {
> struct virtio_blk *vblk = set->driver_data;
>
> - return blk_mq_virtio_map_queues(&set->map[0], vblk->vdev, 0);
> + return blk_mq_virtio_map_queues(&set->map[HCTX_TYPE_DEFAULT],
> + vblk->vdev, 0);
> }
>
> #ifdef CONFIG_VIRTIO_BLK_SCSI
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map
2019-03-12 1:31 [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map Dongli Zhang
2019-04-08 14:00 ` Dongli Zhang
@ 2019-04-08 14:08 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2019-04-08 14:08 UTC (permalink / raw)
To: Dongli Zhang, virtualization, linux-block, linux-kernel; +Cc: mst
On 3/11/19 7:31 PM, Dongli Zhang wrote:
> Use HCTX_TYPE_DEFAULT instead of 0 to avoid hardcoding.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-08 14:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-12 1:31 [PATCH 1/1] virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map Dongli Zhang
2019-04-08 14:00 ` Dongli Zhang
2019-04-08 14:08 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).