Skip to content
  • Hanna Reitz's avatar
    1a37e312
    vpc: Return 0 from vpc_co_create() on success · 1a37e312
    Hanna Reitz authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    1a37e312
    vpc: Return 0 from vpc_co_create() on success
    Hanna Reitz authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading