qcow.c (3c9331c47f22224118d5019b0af8eac704824d8d) | qcow.c (67a0fd2a9bca204d2b39f910a97c7137636a0715) |
---|---|
1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 475 unchanged lines hidden (view full) --- 484 if (bdrv_pwrite_sync(bs->file->bs, l2_offset + l2_index * sizeof(tmp), 485 &tmp, sizeof(tmp)) < 0) 486 return 0; 487 } 488 return cluster_offset; 489} 490 491static int64_t coroutine_fn qcow_co_get_block_status(BlockDriverState *bs, | 1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 475 unchanged lines hidden (view full) --- 484 if (bdrv_pwrite_sync(bs->file->bs, l2_offset + l2_index * sizeof(tmp), 485 &tmp, sizeof(tmp)) < 0) 486 return 0; 487 } 488 return cluster_offset; 489} 490 491static int64_t coroutine_fn qcow_co_get_block_status(BlockDriverState *bs, |
492 int64_t sector_num, int nb_sectors, int *pnum) | 492 int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) |
493{ 494 BDRVQcowState *s = bs->opaque; 495 int index_in_cluster, n; 496 uint64_t cluster_offset; 497 498 qemu_co_mutex_lock(&s->lock); 499 cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0); 500 qemu_co_mutex_unlock(&s->lock); --- 540 unchanged lines hidden --- | 493{ 494 BDRVQcowState *s = bs->opaque; 495 int index_in_cluster, n; 496 uint64_t cluster_offset; 497 498 qemu_co_mutex_lock(&s->lock); 499 cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0); 500 qemu_co_mutex_unlock(&s->lock); --- 540 unchanged lines hidden --- |