Gentoo Archives: gentoo-dev

From: Richard Yao <ryao@g.o>
To: Kernel development list <linux-kernel@×××××××××××.org>
Cc: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>, kernel@g.o, gentooligan@×××××.com
Subject: [gentoo-dev] dm-crypt reordering BIOs across barriers?
Date: Sat, 08 Jun 2013 03:48:28
Message-Id: 51B2A955.4010906@gentoo.org
1 When you use dm-crypt, block IO requests to a dm-* device will invoke
2 dm_request_fn() -> map_request() -> crypt_map(). If a BIO is a write
3 barrier, crypt_map() will return DM_MAPIO_REMAPPED to map_request(),
4 which will immediately queue it to the device.
5
6 If a few dozen IOs are queued in rapid succession with multiple write
7 barriers, all write barriers will be executed before any actual write
8 BIOs occur because the write IOs will be processed asynchronously in a
9 work queue. Since the barriers will be long gone by the time the write
10 IOs are queued, they can be queued in any order.
11
12 Am I misunderstanding this or is dm-crypt ignoring proper write barrier
13 semantics?

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] dm-crypt reordering BIOs across barriers? Sergei Trofimovich <slyfox@g.o>