public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Yao <ryao@gentoo.org>
To: Kernel development list <linux-kernel@vger.kernel.org>
Cc: "gentoo-dev@lists.gentoo.org" <gentoo-dev@lists.gentoo.org>,
	kernel@gentoo.org, gentooligan@gmail.com
Subject: dm-crypt reordering BIOs across barriers?
Date: Fri, 07 Jun 2013 23:47:33 -0400	[thread overview]
Message-ID: <51B2A955.4010906@gentoo.org> (raw)

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

When you use dm-crypt, block IO requests to a dm-* device will invoke
dm_request_fn() -> map_request() -> crypt_map(). If a BIO is a write
barrier, crypt_map() will return DM_MAPIO_REMAPPED to map_request(),
which will immediately queue it to the device.

If a few dozen IOs are queued in rapid succession with multiple write
barriers, all write barriers will be executed before any actual write
BIOs occur because the write IOs will be processed asynchronously in a
work queue. Since the barriers will be long gone by the time the write
IOs are queued, they can be queued in any order.

Am I misunderstanding this or is dm-crypt ignoring proper write barrier
semantics?


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

             reply	other threads:[~2013-06-08  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-08  3:47 Richard Yao [this message]
2013-06-08  6:11 ` [gentoo-dev] dm-crypt reordering BIOs across barriers? Sergei Trofimovich
2013-06-08  9:17   ` Richard Yao

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=51B2A955.4010906@gentoo.org \
    --to=ryao@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=gentooligan@gmail.com \
    --cc=kernel@gentoo.org \
    --cc=linux-kernel@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