linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: 谢纲 <xiegang112@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: ordered I/O with multipath
Date: Wed, 8 Apr 2009 15:30:54 +0100	[thread overview]
Message-ID: <20090408143054.GB3841@shareable.org> (raw)
In-Reply-To: <d364733c0904072159q39d7a52dyd322bd75f528cca1@mail.gmail.com>

谢纲 wrote:
> Some journal filesystem use barrier i/o to ensure the order of the
> committing data. But if the filesystem is on the top of volume manager
> which support the raid and multipath. The barrier i/o might not be
> handled correctly. How does journal filesystem deal with this?

For software RAID and multipath, I think it isn't handled at all.

Even if you disable write-caching in the underlying storage, ordered
requests may not retain their order, so the common database advice to
disable write-cache and use SCSI or SATA-NCQ may not work either.

If the RAID code is changed to handle barriers, that would still have
possible "scattershot" corruption on RAID-5, because writing a single
sector on the logical device affects more than one visible sector if
it is interrupted.  In other words, the "radius of corruption" is
bigger than one sector for RAID-5, and it's not contiguous either.

In principle, journalling filesystems need to know the "radius of
corruption" to provide robust journalling.  If individual sector
writes are atomic, this isn't an issue.  Some people think sector
writes are atomic on modern hard drives (but I wouldn't count on it).
But it is definitely not atomic when writing to a RAID or multipath if
the write affects more than one device.

-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-04-08 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08  4:59 ordered I/O with multipath 谢纲
2009-04-08 14:30 ` Jamie Lokier [this message]
2009-04-08 14:53   ` 谢纲
2009-04-09 18:32   ` Bryan Henderson
2009-04-09 20:00     ` Jamie Lokier
2009-04-10 16:42       ` Bryan Henderson

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=20090408143054.GB3841@shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=xiegang112@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 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).