DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vasile Catalin-B50542 <catalin.vasile@freescale.com>
To: Milan Broz <gmazyland@gmail.com>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] out of order encryption
Date: Thu, 6 Aug 2015 13:12:44 +0300	[thread overview]
Message-ID: <55C3331C.7020301@freescale.com> (raw)
In-Reply-To: <55C325AE.6070604@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

I was referring to the submitted requests.
Does the underlying encryption layer (CryptoAPI) have to ensure the
complete callbacks are called in the order the requests were submitted?
Or does dm-crypt figure out where to read/write after request is done
no matter in which order the crypto requests finished?

On 06.08.2015 12:15, Milan Broz wrote:
> On 08/06/2015 09:00 AM, Vasile Catalin-B50542 wrote:
>> Would dm-crypt execute correctly if sector encryption ended asynchronously?
>> For example:
>> If sector 1, 2, 3 are sent to be done asynchronously to the same
>> algorithm instance,
>> and the jobs end in the following order: 2, 1, 3; does the dm-crypt
>> module know to
>> write the data in the proper place when the encryption "done" callback
>> is called?
> Not sure if I understand your question - encryption in dmcrypt works on sector
> level, sectors are encrypted independetly, so order cannot influence result
> of encryption of individual sectors.
>
> Or if the question is about order of submitted requests:
> If you need to ensure order of processing, you have to issue "flush" operation
> before submitting next data content. Filesystems typically must do this when
> handling journal or so.
>
> In general, requests order can be rearranged (anywhere in block layer, not only in dmcrypt).
> But this is correct behaviour.
>
> Milan

-- 

CatalinVasile

Intern, DN-Software

FreescaleSemiconductor, Inc.

www.freescale.com

phone: 073-021-1938

e-mail: catalin.vasile@freescale.com <mailto:your.name@freescale.com>

*Freescale_Logo-nosemi_Lh_4c***

This e-mail, and any associated attachments have been classified as:

[ ] Public

[ ] Freescale Semiconductor Internal Use Only

[ ] Freescale Semiconductor Confidential Proprietary


[-- Attachment #2.1: Type: text/html, Size: 29900 bytes --]

[-- Attachment #2.2: image002.gif --]
[-- Type: image/gif, Size: 1979 bytes --]

  reply	other threads:[~2015-08-06 10:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06  7:00 [dm-crypt] out of order encryption Vasile Catalin-B50542
2015-08-06  9:15 ` Milan Broz
2015-08-06 10:12   ` Vasile Catalin-B50542 [this message]
2015-08-06 10:38   ` Vasile Catalin-B50542
2015-08-06 11:06     ` Milan Broz
2015-08-06 11:19     ` Lars Winterfeld
2015-08-06 11:32       ` Vasile Catalin-B50542
2015-08-06 11:46         ` Lars Winterfeld
2015-08-06 11:48         ` Milan Broz
2015-08-06 12:10           ` Vasile Catalin-B50542
2015-08-06 12:40             ` Milan Broz

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=55C3331C.7020301@freescale.com \
    --to=catalin.vasile@freescale.com \
    --cc=dm-crypt@saout.de \
    --cc=gmazyland@gmail.com \
    /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