lkml.org 
[lkml]   [2014]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] block: rework flush sequencing for blk-mq
Date
Christoph Hellwig <hch@infradead.org> writes:

> Witch to using a preallocated flush_rq for blk-mq similar to what's done
> with the old request path. This allows us to set up the request properly
> with a tag from the actually allowed range and ->rq_disk as needed by
> some drivers. To make life easier we also switch to dynamic allocation
> of ->flush_rq for the old path.
>
> This effectively reverts most of
>
> "blk-mq: fix for flush deadlock"
>
> and
>
> "blk-mq: Don't reserve a tag for flush request"
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

[snip]

> -static void blk_mq_flush_data_insert(struct request *rq)
> +static bool blk_flush_queue_rq(struct request *rq)
> {
> - INIT_WORK(&rq->mq_flush_data, mq_flush_data_run);
> - kblockd_schedule_work(rq->q, &rq->mq_flush_data);
> + if (rq->q->mq_ops) {
> + INIT_WORK(&rq->mq_flush_work, mq_flush_run);
> + kblockd_schedule_work(rq->q, &rq->mq_flush_work);
> + return false;
> + } else {
> + list_add_tail(&rq->queuelist, &rq->q->queue_head);
> + return true;
> + }
> }
>
> /**
> @@ -187,12 +193,7 @@ static bool blk_flush_complete_seq(struct request *rq, unsigned int seq,
>
> case REQ_FSEQ_DATA:
> list_move_tail(&rq->flush.list, &q->flush_data_in_flight);
> - if (q->mq_ops)
> - blk_mq_flush_data_insert(rq);
> - else {
> - list_add(&rq->queuelist, &q->queue_head);
> - queued = true;
> - }
> + queued = blk_flush_queue_rq(rq);
> break;

Hi, Christoph,

Did you mean to switch from list_add to list_add_tail? That seems like
a change that warrants mention.

Cheers,
Jeff


\
 
 \ /
  Last update: 2014-03-07 22:21    [W:0.113 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site