[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: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate |
Date: |
Fri, 8 Feb 2013 15:12:57 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> > + /* Fix cluster_ending_nr if we are at risk of reading outside the image
> > + * (Cluster unaligned image size)
> > + */
> > + max_cluster_ending_nr = bs->total_sectors - first_sector_after_qiov;
> > + cluster_ending_nr = max_cluster_ending_nr < (uint64_t)
> > cluster_ending_nr ?
> > + (int) max_cluster_ending_nr : cluster_ending_nr;
>
> Is there a test case for the cluster unaligned image size scenario?
I discovered this case using qemu-io-tests one of the test case trigger this.
> > + iov.iov_len = nb_sectors * BDRV_SECTOR_SIZE;
> > + iov.iov_base = data;
> > + qemu_iovec_init_external(&qiov, &iov, 1);
> > + qemu_co_mutex_unlock(&s->lock);
> > + ret = bdrv_co_readv(bs, sector_num, nb_sectors, &qiov);
>
> This function should be marked coroutine_fn - it may only be called from
> inside a coroutine. It's good to mark all coroutine functions so the
> reader knows immediately this will run in coroutine context.
>
> bdrv_co_readv() is does I/O throttling. This is wrong here since we
> don't want to charge for internal I/O.
Should I use qcow2_co_readv to bypass the I/O throttling ?
Benoît
- [Qemu-devel] [RFC V6 02/33] qmp: Add DedupStatus enum., (continued)
- [Qemu-devel] [RFC V6 02/33] qmp: Add DedupStatus enum., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 01/33] qcow2: Add deduplication to the qcow2 specification., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 03/33] qcow2: Add deduplication structures and fields., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_de dup_read_missing_and_concatenate, Benoît Canet, 2013/02/06
- Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate, Eric Blake, 2013/02/06
- [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