[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-upstream-unstable] qcow2: Respect bdrv_truncate() error
commit 9b3f3d6da97727576b36958fa60f0b0faffb334a Author: Max Reitz <mreitz@xxxxxxxxxx> AuthorDate: Tue Dec 2 18:32:52 2014 +0100 Commit: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> CommitDate: Sun Feb 22 12:09:55 2015 -0600 qcow2: Respect bdrv_truncate() error bdrv_truncate() may fail and qcow2_write_compressed() should return the error code in that case. Cc: qemu-stable@xxxxxxxxxx Signed-off-by: Max Reitz <mreitz@xxxxxxxxxx> Reviewed-by: Kevin Wolf <kwolf@xxxxxxxxxx> Signed-off-by: Kevin Wolf <kwolf@xxxxxxxxxx> (cherry picked from commit 6a69b9620ac1562a067990d87284a85552bfd61b) Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> --- block/qcow2.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a33e863..c98d3b7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2162,8 +2162,7 @@ static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, /* align end of file to a sector boundary to ease reading with sector based I/Os */ cluster_offset = bdrv_getlength(bs->file); - bdrv_truncate(bs->file, cluster_offset); - return 0; + return bdrv_truncate(bs->file, cluster_offset); } if (nb_sectors != s->cluster_sectors) { -- generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |