]> git.ipfire.org Git - thirdparty/qemu.git/commit
vpc: Return 0 from vpc_co_create() on success
authorMax Reitz <mreitz@redhat.com>
Mon, 2 Sep 2019 19:33:16 +0000 (21:33 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 28 Oct 2019 04:50:55 +0000 (23:50 -0500)
commit97c478c355fee96eb2b740313f50561e69b6f305
tree6658b3973be122b73ea9a84045256ee06a7b6fcc
parent725dfa851f8e1de8653f41a4bd38c7f98757eb40
vpc: Return 0 from vpc_co_create() on success

blockdev_create_run() directly uses .bdrv_co_create()'s return value as
the job's return value.  Jobs must return 0 on success, not just any
nonnegative value.  Therefore, using blockdev-create for VPC images may
currently fail as the vpc driver may return a positive integer.

Because there is no point in returning a positive integer anywhere in
the block layer (all non-negative integers are generally treated as
complete success), we probably do not want to add more such cases.
Therefore, fix this problem by making the vpc driver always return 0 in
case of success.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 1a37e3124407b5a145d44478d3ecbdb89c63789f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/vpc.c