parallels.c (75b7b25d44a64411ea0ae792d5ebad8ddf22527e) parallels.c (79a558664840adf502fe94907b0a680836e3e98e)
1/*
2 * Block driver for Parallels disk image format
3 *
4 * Copyright (c) 2007 Alex Beregszaszi
5 * Copyright (c) 2015 Denis V. Lunev <den@openvz.org>
6 *
7 * This code was originally based on comparing different disk images created
8 * by Parallels. Currently it is based on opened OpenVZ sources

--- 401 unchanged lines hidden (view full) ---

410 bit = find_next_bit(s->bat_dirty_bmap, size, bit + 1);
411 }
412 bitmap_zero(s->bat_dirty_bmap, size);
413
414 qemu_co_mutex_unlock(&s->lock);
415 return 0;
416}
417
1/*
2 * Block driver for Parallels disk image format
3 *
4 * Copyright (c) 2007 Alex Beregszaszi
5 * Copyright (c) 2015 Denis V. Lunev <den@openvz.org>
6 *
7 * This code was originally based on comparing different disk images created
8 * by Parallels. Currently it is based on opened OpenVZ sources

--- 401 unchanged lines hidden (view full) ---

410 bit = find_next_bit(s->bat_dirty_bmap, size, bit + 1);
411 }
412 bitmap_zero(s->bat_dirty_bmap, size);
413
414 qemu_co_mutex_unlock(&s->lock);
415 return 0;
416}
417
418
419static int coroutine_fn parallels_co_block_status(BlockDriverState *bs,
420 bool want_zero,
421 int64_t offset,
422 int64_t bytes,
423 int64_t *pnum,
424 int64_t *map,
425 BlockDriverState **file)
418static int coroutine_fn GRAPH_RDLOCK
419parallels_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset,
420 int64_t bytes, int64_t *pnum, int64_t *map,
421 BlockDriverState **file)
426{
427 BDRVParallelsState *s = bs->opaque;
428 int count;
429
430 assert(QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE));
431 qemu_co_mutex_lock(&s->lock);
432 offset = block_status(s, offset >> BDRV_SECTOR_BITS,
433 bytes >> BDRV_SECTOR_BITS, &count);

--- 1054 unchanged lines hidden ---
422{
423 BDRVParallelsState *s = bs->opaque;
424 int count;
425
426 assert(QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE));
427 qemu_co_mutex_lock(&s->lock);
428 offset = block_status(s, offset >> BDRV_SECTOR_BITS,
429 bytes >> BDRV_SECTOR_BITS, &count);

--- 1054 unchanged lines hidden ---