[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 77/88] qcow2: Respect bdrv_truncate() error
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 77/88] qcow2: Respect bdrv_truncate() error |
Date: |
Thu, 8 Jan 2015 11:34:21 -0600 |
From: Max Reitz <address@hidden>
bdrv_truncate() may fail and qcow2_write_compressed() should return the
error code in that case.
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 6a69b9620ac1562a067990d87284a85552bfd61b)
Conflicts:
block/qcow2.c
*removed context dependency on 75d3d21
Signed-off-by: Michael Roth <address@hidden>
---
block/qcow2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index e3cc23c..d53f181 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1960,8 +1960,7 @@ static int qcow2_write_compressed(BlockDriverState *bs,
int64_t sector_num,
sector based I/Os */
cluster_offset = bdrv_getlength(bs->file);
cluster_offset = (cluster_offset + 511) & ~511;
- bdrv_truncate(bs->file, cluster_offset);
- return 0;
+ return bdrv_truncate(bs->file, cluster_offset);
}
if (nb_sectors != s->cluster_sectors) {
--
1.9.1
- [Qemu-stable] [PATCH 66/88] block: Make essential BlockDriver objects public, (continued)
- [Qemu-stable] [PATCH 66/88] block: Make essential BlockDriver objects public, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 71/88] qemu-img: Check create_opts before image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 68/88] block/vvfat: qcow driver may not be found, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 69/88] block/nfs: Add create_opts, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 72/88] qemu-img: Check create_opts before image amendment, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 73/88] iotests: Only kill NBD server if it runs, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 74/88] iotests: Add test for unsupported image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 70/88] block: Check create_opts before image creation, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 76/88] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 79/88] block migration: fix return value, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 77/88] qcow2: Respect bdrv_truncate() error,
Michael Roth <=
- [Qemu-stable] [PATCH 78/88] block/raw-posix: Fix ret in raw_open_common(), Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 80/88] qcow2: Fix header extension size check, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 82/88] block: Don't probe for unknown backing file format, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 83/88] linuxboot: compute initrd loading address, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 84/88] linuxboot: fix loading old kernels, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 87/88] target-xtensa: test cross-page opcode, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 85/88] audio: Don't free hw resources until after hw backend is stopped, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 75/88] qcow2: Prevent numerical overflow, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 81/88] qcow2.py: Add required padding for header extensions, Michael Roth, 2015/01/08
- [Qemu-stable] [PATCH 86/88] target-xtensa: fix translation for opcodes crossing page boundary, Michael Roth, 2015/01/08