[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate |
Date: |
Wed, 06 Feb 2013 10:48:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 02/06/2013 05:31 AM, Benoît Canet wrote:
> This function is used to read missing data when unaligned writes are
> done. This function also concatenate missing data with the given
> qiov data in order to prepare a buffer used to look for duplicated
> clusters.
>
> +/*
> + * Prepare a buffer containing all the required data required to compute
> cluster
> + * sized deduplication hashes.
> + * If sector_num or nb_sectors are not cluster-aligned, missing data
> + * before/after the qiov will be read.
> + *
> + * @qiov: the qiov for which missing data must be read
> + * @sector_num: the first sectors that must be read into the qiov
> + * @nb_sectors: the number of sectors to read into the qiov
> + * @data: the place where the data will be concatenated and
> stored
Since data was allocated with qemu_blockalign() instead of the more
typical malloc() or glib functions, you should document that the caller
is responsible to use qemu_vfree() to clean up data on success.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC V6 01/33] qcow2: Add deduplication to the qcow2 specification., (continued)
- [Qemu-devel] [RFC V6 06/33] qcow2: Create a way to link to l2 tables when deduplicating., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 05/33] qcow2: Make update_refcount public., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 11/33] qcow2: Add qcow2_dedup_grow_table and use it., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 12/33] qcow2: Makes qcow2_alloc_cluster_link_l2 mark to deduplicate clusters., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 17/33] qcow2-cache: Allow to choose table size at creation., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 15/33] qcow2: Load and save deduplication table header extension., Benoît Canet, 2013/02/06