diff options
Diffstat (limited to 'block/vmdk.c')
-rw-r--r-- | block/vmdk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index 3fcb75319f..d074f696aa 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1484,8 +1484,8 @@ exit: return ret; } -static int coroutine_fn vmdk_L2update(VmdkExtent *extent, VmdkMetaData *m_data, - uint32_t offset) +static int coroutine_fn GRAPH_RDLOCK +vmdk_L2update(VmdkExtent *extent, VmdkMetaData *m_data, uint32_t offset) { offset = cpu_to_le32(offset); /* update L2 table */ @@ -2028,6 +2028,8 @@ static int coroutine_fn vmdk_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes_done = 0; VmdkMetaData m_data; + assume_graph_lock(); /* FIXME */ + if (DIV_ROUND_UP(offset, BDRV_SECTOR_SIZE) > bs->total_sectors) { error_report("Wrong offset: offset=0x%" PRIx64 " total_sectors=0x%" PRIx64, |