summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-02-01 14:40:05 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-01 14:40:05 -0600
commit77a5f4f20371c5f564d670c25ad72443a9aa2ee6 (patch)
treecc23595312af977016cfab3d052e9dcb5278c5d1 /block.c
parent3e3648b29f80c3c406dae127592150b550f20d2f (diff)
parentfdf263f63fad86b04032da86686a952edfe4644f (diff)
downloadqemu-77a5f4f20371c5f564d670c25ad72443a9aa2ee6.tar.gz
qemu-77a5f4f20371c5f564d670c25ad72443a9aa2ee6.tar.bz2
qemu-77a5f4f20371c5f564d670c25ad72443a9aa2ee6.zip
Merge remote-tracking branch 'stefanha/block' into staging
# By Kevin Wolf (7) and others # Via Stefan Hajnoczi * stefanha/block: block/raw-posix: Build fix for O_ASYNC vmdk: Allow space in file name parallels: Fix bdrv_open() error handling dmg: Use g_free instead of free dmg: Fix bdrv_open() error handling vpc: Fix bdrv_open() error handling cloop: Fix bdrv_open() error handling bochs: Fix bdrv_open() error handling sheepdog: pass vdi_id to sheep daemon for sd_close() vmdk: Allow selecting SCSI adapter in image creation block: Adds mirroring tests for resized images block: Fix is_allocated_above with resized files qemu-iotests: Add regression test for b7ab0fea
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block.c b/block.c
index ba67c0def2..50dab8e595 100644
--- a/block.c
+++ b/block.c
@@ -2800,7 +2800,9 @@ int coroutine_fn bdrv_co_is_allocated_above(BlockDriverState *top,
*
* [sector_num+x, nr_sectors] allocated.
*/
- if (n > pnum_inter) {
+ if (n > pnum_inter &&
+ (intermediate == top ||
+ sector_num + pnum_inter < intermediate->total_sectors)) {
n = pnum_inter;
}