[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 04/11] vpc: make it thread-safe
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 04/11] vpc: make it thread-safe |
Date: |
Wed, 31 May 2017 15:58:57 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 05/31/2017 04:43 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> block/vpc.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> @@ -705,10 +700,13 @@ static int64_t coroutine_fn
> vpc_co_get_block_status(BlockDriverState *bs,
> (sector_num << BDRV_SECTOR_BITS);
> }
>
> - offset = get_sector_offset(bs, sector_num, 0);
> + qemu_co_mutex_lock(&s->lock);
> +
> + offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, 0);
s/0/false/
(Phooey - your code and my efforts to turn block_status into byte-based
code collide; I'll have to rebase again...)
> if (nb_sectors == 0) {
> break;
> }
> - offset = get_sector_offset(bs, sector_num, 0);
> + offset = get_image_offset(bs, sector_num << BDRV_SECTOR_BITS, 0);
s/0/false/
With the correct parameter,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [RFC PATCH 00/11] Block layer thread-safety, part 2, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 01/11] qcow2: call CoQueue APIs under CoMutex, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 03/11] vdi: make it thread-safe, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 02/11] coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 04/11] vpc: make it thread-safe, Paolo Bonzini, 2017/05/31
- Re: [Qemu-block] [Qemu-devel] [PATCH 04/11] vpc: make it thread-safe,
Eric Blake <=
- [Qemu-block] [PATCH 05/11] vvfat: make it thread-safe, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 06/11] nbd: make it thread-safe, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 07/11] qed: move tail of qed_aio_write_main to qed_aio_write_{cow, alloc}, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 08/11] block: invoke .bdrv_drain callback in coroutine context and from AioContext, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 10/11] sheepdog: add queue_lock, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 11/11] ssh: support I/O from any AioContext, Paolo Bonzini, 2017/05/31
- [Qemu-block] [PATCH 09/11] qed: protect table cache with CoMutex, Paolo Bonzini, 2017/05/31