qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v5 08/18] qcow: make encrypt_sectors encrypt in


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH v5 08/18] qcow: make encrypt_sectors encrypt in place
Date: Thu, 23 Feb 2017 13:38:07 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 21.02.2017 um 12:55 hat Daniel P. Berrange geschrieben:
> Instead of requiring separate input/output buffers for
> encrypting data, change encrypt_sectors() to assume
> use of a single buffer, encrypting in place. One current
> caller uses the same buffer for input/output already
> and the other two callers are easily converted to do so.
> 
> Reviewed-by: Alberto Garcia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> Signed-off-by: Daniel P. Berrange <address@hidden>

> @@ -734,21 +729,15 @@ static coroutine_fn int qcow_co_writev(BlockDriverState 
> *bs, int64_t sector_num,
>          if (bs->encrypted) {
>              Error *err = NULL;
>              assert(s->cipher);
> -            if (!cluster_data) {
> -                cluster_data = g_malloc0(s->cluster_size);
> -            }
> -            if (encrypt_sectors(s, sector_num, cluster_data, buf,
> +            if (encrypt_sectors(s, sector_num, buf,
>                                  n, true, &err) < 0) {

This fits in a single line now.

Other than that:
Reviewed-by: Kevinn Wolf <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]