[dm-crypt] Does dm-crypt support journaling filesystem transactional guarantees?

Milan Broz mbroz at redhat.com
Tue Apr 24 09:47:42 CEST 2012

On 04/24/2012 08:45 AM, Yang Zhang wrote:
> I'm considering using ext4 on encrypted LVM (which uses LUKS and
> dm-crypt). Will the transactional guarantees in ext4's journaling be
> preserved?

yes. dm-crypt operates in block layer, so it is filesystem responsibility
to properly set needed bits for IO (flush cache, FUA - force unit access)
and dmcrypt (device-mapper in general and block layer) must process them.

(read http://lwn.net/Articles/400541/ for more info).

In short, ext4, xfs, btrfs and similar filesystems supports
all features over dmcrypt.

(Except very old kernels, but most of stable distros backports patches.)
> Bonus: where may I find authoritative information on this (besides the source)?
The source is your best friend :-)

basically this is the first commit introducing real barrier
(later replaced with FUA) support

You can also use blktrace to see how are fs requests propagated
to physical media.


More information about the dm-crypt mailing list