From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 14 Jul 2010 14:53:05 +0200 (CEST) Message-ID: <4C3DB32E.7070502@redhat.com> Date: Wed, 14 Jul 2010 14:53:02 +0200 From: Milan Broz MIME-Version: 1.0 References: <1279054281.867.5.camel@Koma-Station.localdomain> <4C3CD6C8.6020303@redhat.com> <1279059451.867.23.camel@Koma-Station.localdomain> <4C3D6E0D.6020802@redhat.com> <1279107557.2415.3.camel@Koma-Station.localdomain> <4C3DA515.4030909@redhat.com> <1279109239.2415.10.camel@Koma-Station.localdomain> In-Reply-To: <1279109239.2415.10.camel@Koma-Station.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Wrong behavior? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sven Eschenberg Cc: dm-crypt@saout.de 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