All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yu, Wenqian" <wenqian.yu@intel.com>
To: "dm-crypt@saout.de" <dm-crypt@saout.de>
Cc: "Yu, Wenqian" <wenqian.yu@intel.com>
Subject: [dm-crypt] Hang problem with dm-crypt
Date: Mon, 26 Sep 2016 06:50:09 +0000	[thread overview]
Message-ID: <858B57D94E9DE244922C3CF355D7FFD64EB5FFA0@SHSMSX104.ccr.corp.intel.com> (raw)

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

Hi, all,

I tried to use dm-crypt for disk encryption with accelerators and found that it will hang when accelerator returned EBUSY, which means the driver request queue is full.

Per the logic in crypt_convert(), the request will be skipped if the request is not sent to crypto driver when the driver request queue is full.  Is this expected behavior?

In crypt_convert_block(), the sector is advanced (bio_advance_iter()) no matter whether crypto_skcipher_encrypt()/crypto_skcipher_decrypt() send the request to accelerator driver or not.   When the driver request queue is full, EBUSY will be returned from crypto_skcipher_encrypt()/crypto_skcipher_decrypt().  And in crypt_convert(), the existing implementation is waiting for a completion from a request, which is not queued in the driver when EBUSY is encountered from crypt_convert_block ().  In this case, the sector should not be advanced or should be rolled back as the request is not sent to accelerator driver.

Thanks,

-          Wenqian


[-- Attachment #2: Type: text/html, Size: 5771 bytes --]

             reply	other threads:[~2016-09-26  6:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26  6:50 Yu, Wenqian [this message]
2016-09-26 10:27 ` [dm-crypt] Hang problem with dm-crypt Milan Broz
2016-09-26 13:08   ` Yu, Wenqian
2016-09-27  6:44     ` Milan Broz
2016-09-27  6:44       ` 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=858B57D94E9DE244922C3CF355D7FFD64EB5FFA0@SHSMSX104.ccr.corp.intel.com \
    --to=wenqian.yu@intel.com \
    --cc=dm-crypt@saout.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.