[dm-crypt] Efficacy of xts over 1TB

Milan Broz mbroz at redhat.com
Mon Jul 26 01:42:04 CEST 2010


On 07/26/2010 12:48 AM, Christoph Anton Mitterer wrote:
> On Sun, 2010-07-25 at 17:32 +0200, Arno Wagner wrote:
>> 512B * 2 ^64 = 9444 EB = 9.2 * 10^21 B
> btw: the 512 bytes... is this always the statical block size in
> cryptsetup/dm-crypt or would I have to use e.g. 4K if I have a disk with
> such a block size (i.e. does cryptsetup/dm-crytp always use 512b blocks
> or does it use the underlying physical block size)?

Device-mapper (and here dm-crypt too) always calculate size in 512b sectors,
but is also device topology aware (it honors alignment/optimal io size for 4k hw sector).

IOW sector in linux block level is always 512b but devices with 4k will work
without problems (and with optimal aligned IOs)

You just cannot have dm-crypt using atomic crypto 4k units currently, it is just
low-level hw sector size.
(Maybe in future there could be option for that but it requires new LUKS header flags
at least because such mode is incompatible.)

Milan


More information about the dm-crypt mailing list