Gentoo Archives: gentoo-dev

From: Richard Yao <ryao@g.o>
To: gentoo-dev@l.g.o
Cc: Sergei Trofimovich <slyfox@g.o>, Kernel development list <linux-kernel@×××××××××××.org>, kernel@g.o, gentooligan@×××××.com
Subject: Re: [gentoo-dev] dm-crypt reordering BIOs across barriers?
Date: Sat, 08 Jun 2013 09:18:01
Message-Id: 51B2F694.7010008@gentoo.org
In Reply to: Re: [gentoo-dev] dm-crypt reordering BIOs across barriers? by Sergei Trofimovich
1 On 06/08/2013 02:11 AM, Sergei Trofimovich wrote:
2 > On Fri, 07 Jun 2013 23:47:33 -0400
3 > Richard Yao <ryao@g.o> wrote:
4 >
5 >> When you use dm-crypt, block IO requests to a dm-* device will invoke
6 >> dm_request_fn() -> map_request() -> crypt_map(). If a BIO is a write
7 >> barrier, crypt_map() will return DM_MAPIO_REMAPPED to map_request(),
8 >> which will immediately queue it to the device.
9 >>
10 >> If a few dozen IOs are queued in rapid succession with multiple write
11 >> barriers, all write barriers will be executed before any actual write
12 >> BIOs occur because the write IOs will be processed asynchronously in a
13 >> work queue. Since the barriers will be long gone by the time the write
14 >> IOs are queued, they can be queued in any order.
15 >>
16 >> Am I misunderstanding this or is dm-crypt ignoring proper write barrier
17 >> semantics?
18 >>
19 > http://www.saout.de/pipermail/dm-crypt/2012-April/002441.html
20 > http://lwn.net/Articles/400541/
21 >
22
23 It might be worth stating that I thought flush was a synonym for
24 barrier. It still looks like there is an issue, despite my incorrect
25 terminology.

Attachments

File name MIME type
signature.asc application/pgp-signature