crypto: support multiple threads accessing one QCryptoBlock
commitc972fa123c73501b4b0c6de7873754ea3205a5eb
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 7 Dec 2018 16:13:51 +0000 (7 19:13 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 12 Dec 2018 11:16:49 +0000 (12 11:16 +0000)
treebde968050ae58bb203988e66bfe1cbe7110d0fef
parent0f0d596cb16a43314c8bc4a9afa2f966203fb05f
crypto: support multiple threads accessing one QCryptoBlock

The two thing that should be handled are cipher and ivgen. For ivgen
the solution is just mutex, as iv calculations should not be long in
comparison with encryption/decryption. And for cipher let's just keep
per-thread ciphers.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
block/crypto.c
block/qcow.c
block/qcow2.c
crypto/block-luks.c
crypto/block-qcow.c
crypto/block.c
crypto/blockpriv.h
include/crypto/block.h
tests/test-crypto-block.c