parallels: respect error code of bdrv_getlength() in allocate_clusters()
commitd8b83e37c381cf86ecd907301b7dcc65baaa0aea
authorDenis V. Lunev <den@openvz.org>
Fri, 4 Aug 2017 15:10:12 +0000 (4 18:10 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 8 Aug 2017 13:19:16 +0000 (8 15:19 +0200)
tree06e7aee6e0864e40ae294f5914bc453cfaa74670
parent70d9110b440e5252f637d54b5efd33bbc6237c1f
parallels: respect error code of bdrv_getlength() in allocate_clusters()

If we can not get the file length, the state of BDS is broken completely.
Return error to the caller.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/parallels.c