From: Jeff Moyer <jmoyer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>, Shaohua Li <shli@fusionio.com>,
linux-kernel@vger.kernel.org, msnitzer@redhat.com
Subject: Re: [PATCH 1/1] block: rework flush sequencing for blk-mq
Date: Fri, 07 Mar 2014 15:45:09 -0500 [thread overview]
Message-ID: <x49iorp3fhm.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20140130132630.GB6031@infradead.org> (Christoph Hellwig's message of "Thu, 30 Jan 2014 05:26:30 -0800")
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
next prev parent reply other threads:[~2014-03-07 20:45 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 13:26 [PATCH 0/1] " Christoph Hellwig
2014-01-30 13:26 ` [PATCH 1/1] " Christoph Hellwig
2014-02-07 1:18 ` Shaohua Li
2014-02-07 14:19 ` Christoph Hellwig
2014-02-08 0:55 ` Shaohua Li
2014-02-10 10:33 ` Christoph Hellwig
2014-03-07 20:45 ` Jeff Moyer [this message]
2014-03-08 15:52 ` Christoph Hellwig
2014-03-08 17:33 ` Mike Snitzer
2014-03-08 19:51 ` Hannes Reinecke
2014-03-08 18:13 ` Mike Snitzer
2014-03-08 21:33 ` Hannes Reinecke
2014-03-08 22:09 ` [PATCH] block: fix q->flush_rq NULL pointer crash on dm-mpath flush Mike Snitzer
2014-03-09 0:24 ` Jens Axboe
2014-03-09 0:57 ` Mike Snitzer
2014-03-09 3:18 ` Jens Axboe
2014-03-09 3:29 ` Mike Snitzer
2014-03-12 10:28 ` [PATCH 1/1] block: rework flush sequencing for blk-mq Christoph Hellwig
2014-03-12 10:50 ` Hannes Reinecke
2014-03-12 10:55 ` Christoph Hellwig
2014-03-12 11:07 ` Hannes Reinecke
2014-03-12 11:00 ` SuSE O_DIRECT|O_NONBLOCK overload Christoph Hellwig
2014-03-13 0:15 ` NeilBrown
2014-03-14 17:46 ` Mike Christie
2014-03-13 16:13 ` [PATCH 1/1] block: rework flush sequencing for blk-mq Mike Snitzer
2014-03-14 9:25 ` Christoph Hellwig
2014-03-14 9:30 ` Hannes Reinecke
2014-03-14 12:44 ` Christoph Hellwig
2014-03-14 9:34 ` Christoph Hellwig
2014-03-14 9:52 ` Hannes Reinecke
2014-03-14 10:58 ` Christoph Hellwig
2014-03-14 11:10 ` Hannes Reinecke
2014-03-14 13:00 ` Mike Snitzer
2014-03-14 13:23 ` Christoph Hellwig
2014-03-14 14:13 ` Mike Snitzer
2014-03-15 13:28 ` scsi_debug and mutipath, was " Christoph Hellwig
2014-03-17 11:55 ` [dm-devel] " Bryn M. Reeves
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=x49iorp3fhm.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msnitzer@redhat.com \
--cc=shli@fusionio.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®