DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Sven Eschenberg <sven@whgl.uni-frankfurt.de>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] Wrong behavior?
Date: Wed, 14 Jul 2010 14:53:02 +0200	[thread overview]
Message-ID: <4C3DB32E.7070502@redhat.com> (raw)
In-Reply-To: <1279109239.2415.10.camel@Koma-Station.localdomain>

On 07/14/2010 02:07 PM, Sven Eschenberg wrote:
> I don't see why cryptsetup does not end up with 1024 sectors (which is
> the optimal_io_size) - or is the luks header bigger than 512k? even
> bigger than 1 MB (2048 sectors) ?

yes. not header, but space for 8 keyslots.

Alignment is multiple of caclulated size - keyslot takes a lot of space.
Add --debug - you see required alignment there, then code must take
into account keyslots size.

So you have 2048s optimal IO size, I expect you are using 512bit key,
so alignment using default 4k is 4040 sectors (only space for keyslots).

So code must align to next multiple of 2048 - it is 4096.

Milan

      parent reply	other threads:[~2010-07-14 12:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 20:51 [dm-crypt] Wrong behavior? Sven Eschenberg
2010-07-13 21:12 ` Milan Broz
2010-07-13 22:17   ` Sven Eschenberg
     [not found]     ` <AANLkTilvdewwcdzdm2uX6go9q2dahLX7Fes-lwDNOkvU@mail.gmail.com>
2010-07-14  6:07       ` MkFly
2010-07-14  6:38         ` Heinz Diehl
2010-07-14  8:20           ` Milan Broz
2010-07-14 10:09           ` Arno Wagner
2010-07-14 18:09             ` Christoph Anton Mitterer
2010-07-14  7:58     ` Milan Broz
2010-07-14 11:39       ` Sven Eschenberg
2010-07-14 11:52         ` Milan Broz
2010-07-14 12:07           ` Sven Eschenberg
2010-07-14 12:13             ` Arno Wagner
2010-07-14 12:53             ` Milan Broz [this message]

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=4C3DB32E.7070502@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    --cc=sven@whgl.uni-frankfurt.de \
    /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