Re: [Patch]Sheepdog storage driver ignore refreshVol func's return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/05/2013 09:48 PM, harryxiyou wrote:
> Hi all,
> 
> In libvirt/src/storage/storage_backend_sheepdog.c file, func
> virStorageBackendSheepdogCreateVol calls func
> virStorageBackendSheepdogRefreshVol to refresh Sheepdog volume infos.
> But we do not check func virStorageBackendSheepdogRefreshVol's return
> value. Following patch can fix this bug.
> 
> Signed-off-by: Harry Wei <harryxiyou@xxxxxxxxx>
> Subject: [PATCH] sheepdog driver ignore return value for refresh volume

Thanks for attempting a patch.  However, the commit message is
unconventionally formatted; did you use 'git send-email' to send your
patch, as suggested in HACKING?  We would have to amend the message to
get rid of the 'Hi all,' line, as well as the unusual 'Subject:' line
after a sign-off.

> 
> ---
>  src/storage/storage_backend_sheepdog.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/storage/storage_backend_sheepdog.c
> b/src/storage/storage_backend_sheepdog.c
> index 66d8fb4..e72c944 100644
> --- a/src/storage/storage_backend_sheepdog.c
> +++ b/src/storage/storage_backend_sheepdog.c
> @@ -168,9 +168,12 @@ virStorageBackendSheepdogCreateVol(virConnectPtr
> conn ATTRIBUTE_UNUSED,
>      virCommandAddArgFormat(cmd, "%llu", vol->capacity);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      ret = virCommandRun(cmd, NULL);
> +	if (0 > ret)
> +		goto cleanup;

This patch fails 'make syntax-check', because it used TABs.  Also, we
tend to use (ret < 0), not (0 > ret), even though they are equivalent.

> 
> -    virStorageBackendSheepdogRefreshVol(conn, pool, vol);
> +    ret = virStorageBackendSheepdogRefreshVol(conn, pool, vol);
> 
> +cleanup:
>      virCommandFree(cmd);
>      return ret;
>  }
> 

Would you mind resubmitting to touch up those issues?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]