]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm crypt: don't allocate pages for a partial request
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 28 Mar 2014 19:51:56 +0000 (15:51 -0400)
committerMike Snitzer <snitzer@redhat.com>
Thu, 29 May 2014 16:40:57 +0000 (12:40 -0400)
commit8c47f205d60664f93834f382540481f35112f509
treeeeb557da71f36209123b41e28a37f407929929a4
parent4643d0c75704f142d70ac6ebe7500559dff51989
dm crypt: don't allocate pages for a partial request

Change crypt_alloc_buffer so that it only ever allocates pages for a
full request.

This change is a prerequisite for the commit "dm crypt: offload writes
to thread".  Which implies this change is effectively required for the
upcoming cpu parallelization changes.

But this change simplifies the dm-crypt code at the expense of reduced
throughput in low memory conditions (where allocation for a partial
request is most useful).

This change also enables the removal of the io_pending refcount.

Note: the next commit ("dm-crypt: avoid deadlock in mempools") is needed
to fix a theoretical deadlock.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c