DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Mandeep Singh Baines <msb@chromium.org>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] En/decrypting in multi-sector batches?
Date: Sun, 01 May 2011 10:13:58 +0200	[thread overview]
Message-ID: <4DBD1646.7080704@redhat.com> (raw)
In-Reply-To: <20110429173314.GJ4237@google.com>

On 04/29/2011 07:33 PM, Mandeep Singh Baines wrote:
> But isn't this what should happen? You're trying to do 512B direct I/O
> on a block device with a 4096B logical block size. The same error would
> happen if you tried to do 512B direct I/O on a disk with a 4096B
> logical block size. A portable user-space application should not
> assume a logical block size when using direct I/O.

Sure. But I just tried to point out that dmcrypt is adds
additional restrictions not related to real underlying device
sector size. 
Today it works in all situations because 512B is always atomic.

The encryption unit size must be part of configuration, it cannot
be automatically derived from page size of hw sector size.
(e.g. mount image of disk through loopback will switch to 512B sector).

I am not saying it is not possible to use larger block sizes,
probably one day it will happen but it requires more changes in advance.

(and btw dmcrypt and cryptsetup are friedly to native 4k drives already,
just encryption unit is still 512B)

Milan

      reply	other threads:[~2011-05-01  8:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 15:17 [dm-crypt] En/decrypting in multi-sector batches? Will Drewry
2011-04-26 17:46 ` Arno Wagner
2011-04-27  7:19 ` Milan Broz
2011-04-27 15:07   ` Will Drewry
2011-04-28 18:43     ` Arno Wagner
2011-04-29 17:33   ` Mandeep Singh Baines
2011-05-01  8:13     ` 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=4DBD1646.7080704@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    --cc=msb@chromium.org \
    /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