[libvirt] [PATCH] Fix FS volume creation with backing stores.

Daniel P. Berrange berrange at redhat.com
Tue Jun 16 09:40:29 UTC 2009


On Mon, Jun 15, 2009 at 06:11:08PM -0400, Cole Robinson wrote:
> This regressed when CreateXMLFrom was added: we should only perform the
> backing store comparison if an input volume was passed.
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/storage_backend_fs.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c
> index ac7c424..5b9830e 100644
> --- a/src/storage_backend_fs.c
> +++ b/src/storage_backend_fs.c
> @@ -1251,8 +1251,9 @@ static int createQemuImg(virConnectPtr conn,
>           * backing store, not really sure what use it serves though, and it
>           * may cause issues with lvm. Untested essentially.
>           */
> -        if (!inputBackingPath ||
> -            !STREQ(inputBackingPath, vol->backingStore.path)) {
> +        if (inputvol &&
> +            (!inputBackingPath ||
> +             !STREQ(inputBackingPath, vol->backingStore.path))) {
>              virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
>                                    "%s", _("a different backing store can not "
>                                            "be specified."));

ACK, but can you change !STREQ to STRNEQ  when committing.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list