Revision e183ef75 block/vpc.c

b/block/vpc.c
456 456
    return 0;
457 457
}
458 458

  
459
static coroutine_fn int vpc_co_write(BlockDriverState *bs, int64_t sector_num,
460
                                     const uint8_t *buf, int nb_sectors)
461
{
462
    int ret;
463
    BDRVVPCState *s = bs->opaque;
464
    qemu_co_mutex_lock(&s->lock);
465
    ret = vpc_write(bs, sector_num, buf, nb_sectors);
466
    qemu_co_mutex_unlock(&s->lock);
467
    return ret;
468
}
469

  
459 470
static int vpc_flush(BlockDriverState *bs)
460 471
{
461 472
    return bdrv_flush(bs->file);
......
653 664
    .bdrv_probe     = vpc_probe,
654 665
    .bdrv_open      = vpc_open,
655 666
    .bdrv_read      = vpc_co_read,
656
    .bdrv_write     = vpc_write,
667
    .bdrv_write     = vpc_co_write,
657 668
    .bdrv_flush     = vpc_flush,
658 669
    .bdrv_close     = vpc_close,
659 670
    .bdrv_create    = vpc_create,

Also available in: Unified diff