dm crypt: use io thread for reads only if mempool exhausted
authorMilan Broz <mbroz@redhat.com>
Thu, 13 Jan 2011 19:59:53 +0000 (19:59 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 13 Jan 2011 19:59:53 +0000 (19:59 +0000)
commit20c82538e4f5ede51bc2b4795bc6e5cae772796d
treea70248a06b21bf249382d6f6beac4b8681bf8f35
parentc029772125594e31eb1a5ad9e0913724ed9891f2
dm crypt: use io thread for reads only if mempool exhausted

If there is enough memory, code can directly submit bio
instead queing this operation in separate thread.

Try to alloc bio clone with GFP_NOWAIT and only if it
fails use separate queue (map function cannot block here).

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-crypt.c