From: Tejun Heo <tj@kernel.org>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <jaxboe@fusionio.com>,
Mike Snitzer <msnitzer@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [patch] block: properly handle flush/fua requests in blk_insert_cloned_request
Date: Tue, 9 Aug 2011 18:13:34 +0200 [thread overview]
Message-ID: <20110809161334.GC23842@htj.dyndns.org> (raw)
In-Reply-To: <x49liv2eg34.fsf@segfault.boston.devel.redhat.com>
Hello,
On Tue, Aug 09, 2011 at 11:53:51AM -0400, Jeff Moyer wrote:
> Tejun Heo <tj@kernel.org> writes:
> > I'm a bit confused. We still need ELEVATOR_INSERT_FLUSH fix for
> > insertion paths, right? Or is blk_insert_cloned_request() supposed to
> > used only by request based dm which lives under the elevator? If so,
> > it would be great to make that explicit in the comment. Maybe just
> > renaming it to blk_insert_dm_cloned_request() would be better as it
> > wouldn't be safe for other cases anyway.
>
> request-based dm is the only caller at present. I'm not a fan of
> renaming the function, but I'm more than willing to comment it.
I'm still confused and don't think the patch is correct (you can't
turn off REQ_FUA without decomposing it to data + post flush).
Going through flush machinery twice is okay and I think is the right
thing to do. At the upper queue, the request is decomposed to member
requests. After decomposition, it's either REQ_FLUSH w/o data or data
request w/ or w/o REQ_FUA. When the decomposed request reaches lower
queue, the lower queue will then either short-circuit it, execute
as-is or decompose data w/ REQ_FUA into data + REQ_FLUSH sequence.
AFAICS, the breakages are...
* ELEVATOR_INSERT_FLUSH not used properly from insert paths.
* Short circuit not kicking in for the dm requests. (the above and the
policy patch should solve this, right?)
* BUG(!rq->bio || ...) in blk_insert_flush(). I think we can lift
this restriction for empty REQ_FLUSH but also dm can just send down
requests with empty bio.
Thanks.
--
tejun
next prev parent reply other threads:[~2011-08-09 16:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 15:05 Jeff Moyer
2011-08-09 15:38 ` Tejun Heo
2011-08-09 15:53 ` Jeff Moyer
2011-08-09 16:13 ` Tejun Heo [this message]
2011-08-09 16:19 ` Tejun Heo
2011-08-09 17:43 ` Mike Snitzer
2011-08-09 17:51 ` Tejun Heo
2011-08-09 18:33 ` Mike Snitzer
2011-08-09 17:52 ` Vivek Goyal
2011-08-09 17:55 ` Tejun Heo
2011-08-09 18:55 ` Mike Snitzer
2011-08-09 19:05 ` Vivek Goyal
2011-08-10 15:49 ` Jeff Moyer
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=20110809161334.GC23842@htj.dyndns.org \
--to=tj@kernel.org \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msnitzer@redhat.com \
--cc=vgoyal@redhat.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®