block: support passing 'backing': '' to 'blockdev-add'
commit3e8c2e57056614933fc5eb022e1d6d0f28071b44
authorAlberto Garcia <berto@igalia.com>
Mon, 26 Oct 2015 12:27:15 +0000 (26 14:27 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 11 Nov 2015 15:25:47 +0000 (11 16:25 +0100)
tree2a3b6968a1406c4ac4c0e096dcaf7f9c2ab562b9
parenta911e6ae7ce47d51b519d462c1d99d53b37b0f8c
block: support passing 'backing': '' to 'blockdev-add'

Passing an empty string allows opening an image but not its backing
file. This was already described in the API documentation, only the
implementation was missing.

This is useful for creating snapshots using images opened with
blockdev-add, since they are not supposed to have a backing image
before the operation.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c