Re: [Qemu-block] [PATCH v2 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()

2017-06-12 Thread Alberto Garcia
On Fri 09 Jun 2017 04:53:05 PM CEST, Eric Blake wrote: > Let's suppose we have a guest issuing 512-byte aligned requests and a > host that requires 4k alignment; and the guest does an operation that > needs a COW with one sector at both the front and end of the cluster. > >> @@ -760,22 +776,59 @@

Re: [Qemu-block] [PATCH v2 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()

2017-06-09 Thread Eric Blake
On 06/07/2017 09:08 AM, Alberto Garcia wrote: > This patch splits do_perform_cow() into three separate functions to > read, encrypt and write the COW regions. > > perform_cow() can now read both regions first, then encrypt them and > finally write them to disk. The memory allocation is also done

[Qemu-block] [PATCH v2 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()

2017-06-07 Thread Alberto Garcia
This patch splits do_perform_cow() into three separate functions to read, encrypt and write the COW regions. perform_cow() can now read both regions first, then encrypt them and finally write them to disk. The memory allocation is also done in this function now, using one single buffer large