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 ; Thu, 17 Mar 2011 16:08:38 +0100 (CET) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2HF8bbN010399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 17 Mar 2011 11:08:37 -0400 Received: from [10.34.26.53] (tawny.brq.redhat.com [10.34.26.53]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2HF8auS008885 for ; Thu, 17 Mar 2011 11:08:37 -0400 Message-ID: <4D8223F4.3020005@redhat.com> Date: Thu, 17 Mar 2011 16:08:36 +0100 From: Milan Broz MIME-Version: 1.0 References: <20110317152918.e7bfac44.taeuber@bbaw.de> In-Reply-To: <20110317152918.e7bfac44.taeuber@bbaw.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] HDD sector size interrelated with dm-crypt? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 03/17/2011 03:29 PM, Lars T=E4uber wrote: > does dm-crypt depend in any way on the sector size of the block > device to be encrypted? So the real question is: Does dm-crypt work > as expected on a 4KiB sector sized SATA drive when there is no > translation to 512B sector size? Are there options that must be taken > then? >=20 > I've read somewhere that the encryption algorithm work with 512B > block sizes. Could this be changed to 4KiB block sizes to gain speed > with the upcoming devices? dmcrypt always uses 512 bytes sector for encryption, it cannot be changed easily to 4k sectors (internal block layer bio structure and device-mapper always counts in 512 sectors). I do not think that with accelerated encryption like AES-NI the speed up would be so visible. But the whole stack (including device-mapper) properly aligns to drive sector size, so it will work with 4k drives without problems. I think many people is already using it on true 4k drives. In fact mapping sector is the block layer problem, device-mapper targets just propagates block size information up the stack. Milan