linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: dong wu <dongwucs@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: linux-raid raid5 delaying write
Date: Thu, 7 Jan 2010 10:44:09 -0700	[thread overview]
Message-ID: <e9c3a7c21001070944iea98871tb2b42e942c14b87@mail.gmail.com> (raw)
In-Reply-To: <6c394cc31001070418w60785400v77e0e7a47b0732fc@mail.gmail.com>

On Thu, Jan 7, 2010 at 5:18 AM, dong wu <dongwucs@gmail.com> wrote:
> hello,
> In the source code,in order to collect multiple write requests,first
> add the requests to delayed_list,
> then use plug/unplug to wait.During the waiting time,if other requests
> arrive to full a stripe_head buffer,
> then compute parity and send write request to low level to deal.
> If not so, the requests will be set pre-read mark
> stripe_preread_active,then send pre-read request to low level.
> I want to know if up level send read request and later a write request
> arrive to write the same place of read request before,
> will the read request be canceled and return the data of write request?

No, it is up to the filesystem or whatever code is above the RAID to
enforce ordering.  In order to guarantee that a read returns the data
from a previous write you either need to wait for the write to
complete, or with recent kernels send a barrier request to flush the
write.

--
Dan

      reply	other threads:[~2010-01-07 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:18 linux-raid raid5 delaying write dong wu
2010-01-07 17:44 ` Dan Williams [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=e9c3a7c21001070944iea98871tb2b42e942c14b87@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=dongwucs@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).