OSDN Git Service

dm crypt: don't allocate pages for a partial request
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 13 Feb 2015 13:23:52 +0000 (08:23 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 16 Feb 2015 16:11:12 +0000 (11:11 -0500)
Change crypt_alloc_buffer so that it only ever allocates pages for a
full request.  This is a prerequisite for the commit "dm crypt: offload
writes to thread".

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).

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>

No differences found