All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Eric Mei <meijia@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: write barrier in RAID5
Date: Tue, 7 Apr 2015 11:25:14 +1000	[thread overview]
Message-ID: <20150407112514.77f96bc1@notabene.brown> (raw)
In-Reply-To: <551C37E6.6090201@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

On Wed, 01 Apr 2015 12:24:38 -0600 Eric Mei <meijia@gmail.com> wrote:

> I can see how FUA is handled, but REQ_FLUSH seems problematic. My 
> understanding of REQ_FLUSH semantics: all requests before the flush 
> request must *complete* before the flush request complete. For IO remap 
> layer like MD, we need to guarantee all previous requests are 
> *submitted* to component devices before submitting the flush request. Is 
> that correct?

No.

See Documentation/block/writeback_cache_control.txt

Only "previously completed" requests are affect by REQ_FLUSH.

So any code using REQ_FLUSH must first wait for previous requests to
complete, and then submit REQ_FLUSH.  The REQ_FLUSH will not return until the
data written by those requests is actually in stable storage, rather than
write-behind cache.

NeilBrown


> 
> If so why I don't see the code which make sure the pending write 
> requests in stripe cache are processed & submitted before 
> submit_flushes() get called? Thanks
> 
> Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

      reply	other threads:[~2015-04-07  1:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 18:24 write barrier in RAID5 Eric Mei
2015-04-07  1:25 ` NeilBrown [this message]

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=20150407112514.77f96bc1@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=meijia@gmail.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.