From: Mike Snitzer <snitzer@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jeff Moyer <jmoyer@redhat.com>,
linux-kernel@vger.kernel.org, Jens Axboe <jaxboe@fusionio.com>,
Vivek Goyal <vgoyal@redhat.com>,
dm-devel@redhat.com
Subject: Re: block: properly handle flush/fua requests in blk_insert_cloned_request
Date: Tue, 9 Aug 2011 14:33:47 -0400 [thread overview]
Message-ID: <20110809183345.GB13293@redhat.com> (raw)
In-Reply-To: <20110809175110.GE23842@htj.dyndns.org>
On Tue, Aug 09 2011 at 1:51pm -0400,
Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Tue, Aug 09, 2011 at 01:43:47PM -0400, Mike Snitzer wrote:
> > [cc'ing dm-devel]
> >
> > All of these issues have come to light because DM was not setting
> > flush_flags based on the underlying device(s). Now fixed in v3.1-rc1:
> > ed8b752 dm table: set flush capability based on underlying devices
> >
> > Given that commit, and that request-based DM is beneath the elevator, it
> > seems any additional effort to have DM flushes re-enter the flush
> > machinary is unnecessary.
>
> Hmmm... what if the underlying devices have different featureset? Use
> the lowest common denominator?
Yes, for DM, if any device in the stack requires FLUSH/FUA then
the upper request_queue's flush_flags will be set to reflect that.
Bio-based DM _could_ end up issuing a flush to a device that doesn't
need the flush. But once the bio emerges from the bottom of the
bio-based stack it'll get handed to the flush mechanism where it'll be
dropped.
Bio-based DM may stack ontop of request-based DM (think LVM ontop of
mpath device). Request-based DM may _not_ stack on bio-based DM.
Request-based DM, the cause of all this discussion, is only used for the
multipath target and I'm not aware of any plans to provide more complex
stacking via request-based DM. Doing so would require splitting a
request that spans target boundaries, etc.
So we're left with request-based DM only allowing a single target,
meaning: even if request-based DM were stacked a couple times the
flush_flags would still reflect the underlying physical device's queue.
> The flush mechanism is designed to
> deal with stacking by going through flush at each level. Stacking
> queue can simply export support for both REQ_FLUSH and FUA and the
> lower lever queue will decompose them according to the capability
> supported by the actual device.
>
> IIUC, what's broken here is some insert functions aren't using
> ELEVATOR_INSERT_FLUSH when needed and there are some issues due to the
> special nature of the stacked requests which I think should be fixed.
OK, conceptually pure, just seems the fixes are multiplying.
next prev parent reply other threads:[~2011-08-09 18:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 15:05 [patch] block: properly handle flush/fua requests in blk_insert_cloned_request Jeff Moyer
2011-08-09 15:38 ` Tejun Heo
2011-08-09 15:53 ` Jeff Moyer
2011-08-09 16:13 ` Tejun Heo
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 [this message]
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=20110809183345.GB13293@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.