qcow2: qcow2_co_preadv: improve locking
commitf24196d388ec781ce3ae99c1fb78ba9755785f91
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 6 May 2019 14:27:39 +0000 (6 17:27 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 28 May 2019 18:30:55 +0000 (28 20:30 +0200)
tree040436e09bc92779e9ea2c5dccd001b81a6ecdaf
parent6f13a316dd3a6916de4733e56585127445b19458
qcow2: qcow2_co_preadv: improve locking

Background: decryption will be done in threads, to take benefit of it,
we should move it out of the lock first.

But let's go further: it turns out, that only
qcow2_get_cluster_offset() needs locking, so reduce locking to it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190506142741.41731-7-vsementsov@virtuozzo.com
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c