vdi.c (067179868ec8cd467d9810143339e882cb60e388) | vdi.c (79a558664840adf502fe94907b0a680836e3e98e) |
---|---|
1/* 2 * Block driver for the Virtual Disk Image (VDI) format 3 * 4 * Copyright (c) 2009, 2012 Stefan Weil 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 2 of the License, or --- 506 unchanged lines hidden (view full) --- 515} 516 517static int vdi_reopen_prepare(BDRVReopenState *state, 518 BlockReopenQueue *queue, Error **errp) 519{ 520 return 0; 521} 522 | 1/* 2 * Block driver for the Virtual Disk Image (VDI) format 3 * 4 * Copyright (c) 2009, 2012 Stefan Weil 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 2 of the License, or --- 506 unchanged lines hidden (view full) --- 515} 516 517static int vdi_reopen_prepare(BDRVReopenState *state, 518 BlockReopenQueue *queue, Error **errp) 519{ 520 return 0; 521} 522 |
523static int coroutine_fn vdi_co_block_status(BlockDriverState *bs, 524 bool want_zero, 525 int64_t offset, int64_t bytes, 526 int64_t *pnum, int64_t *map, 527 BlockDriverState **file) | 523static int coroutine_fn GRAPH_RDLOCK 524vdi_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset, 525 int64_t bytes, int64_t *pnum, int64_t *map, 526 BlockDriverState **file) |
528{ 529 BDRVVdiState *s = (BDRVVdiState *)bs->opaque; 530 size_t bmap_index = offset / s->block_size; 531 size_t index_in_block = offset % s->block_size; 532 uint32_t bmap_entry = le32_to_cpu(s->bmap[bmap_index]); 533 int result; 534 535 logout("%p, %" PRId64 ", %" PRId64 ", %p\n", bs, offset, bytes, pnum); --- 531 unchanged lines hidden --- | 527{ 528 BDRVVdiState *s = (BDRVVdiState *)bs->opaque; 529 size_t bmap_index = offset / s->block_size; 530 size_t index_in_block = offset % s->block_size; 531 uint32_t bmap_entry = le32_to_cpu(s->bmap[bmap_index]); 532 int result; 533 534 logout("%p, %" PRId64 ", %" PRId64 ", %p\n", bs, offset, bytes, pnum); --- 531 unchanged lines hidden --- |