Skip to content

Commit

Permalink
blk-mq: add async parameter to blk_mq_start_stopped_hw_queues
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Apr 16, 2014
1 parent 91b6363 commit 1b4a325
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
}
EXPORT_SYMBOL(blk_mq_start_hw_queue);

void blk_mq_start_stopped_hw_queues(struct request_queue *q)
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async)
{
struct blk_mq_hw_ctx *hctx;
int i;
Expand All @@ -711,7 +711,7 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)

clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
preempt_disable();
blk_mq_run_hw_queue(hctx, true);
blk_mq_run_hw_queue(hctx, async);
preempt_enable();
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void virtblk_done(struct virtqueue *vq)

/* In case queue is stopped waiting for more buffers. */
if (req_done)
blk_mq_start_stopped_hw_queues(vblk->disk->queue);
blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);
}

static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req)
Expand Down Expand Up @@ -762,7 +762,7 @@ static int virtblk_restore(struct virtio_device *vdev)
vblk->config_enable = true;
ret = init_vq(vdev->priv);
if (!ret)
blk_mq_start_stopped_hw_queues(vblk->disk->queue);
blk_mq_start_stopped_hw_queues(vblk->disk->queue, true);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion include/linux/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void blk_mq_complete_request(struct request *rq);
void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
void blk_mq_stop_hw_queues(struct request_queue *q);
void blk_mq_start_stopped_hw_queues(struct request_queue *q);
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async);

/*
* Driver command data is immediately after the request. So subtract request
Expand Down

0 comments on commit 1b4a325

Please sign in to comment.