]> git.baikalelectronics.ru Git - kernel.git/commit
dm crypt: fix ctx pending
authorMilan Broz <mbroz@redhat.com>
Fri, 28 Mar 2008 21:16:07 +0000 (14:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Mar 2008 21:45:22 +0000 (14:45 -0700)
commit85785f8086b51512823b13020820bd869aa6740c
tree1d47de4bdae1009b6efc80824ca882de0a97cfef
parentd21340bf50f7f453d5191ce51c8f9986b5b283b2
dm crypt: fix ctx pending

Fix regression in dm-crypt introduced in commit
0fdef1cef4bda77e16a8196829c474ba77275f24 ("dm crypt: use async crypto").

If write requests need to be split into pieces, the code must not process them
in parallel because the crypto context cannot be shared.  So there can be
parallel crypto operations on one part of the write, but only one write bio
can be processed at a time.

This is not optimal and the workqueue code needs to be optimized for parallel
processing, but for now it solves the problem without affecting the
performance of synchronous crypto operation (most of current dm-crypt users).

http://bugzilla.kernel.org/show_bug.cgi?id=10242
http://bugzilla.kernel.org/show_bug.cgi?id=10207

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/dm-crypt.c