qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] rbd: make the code better readable


From: 李秀波
Subject: Re: [Qemu-block] [PATCH] rbd: make the code better readable
Date: Sat, 15 Oct 2016 07:51:46 +0800
User-agent: 139mail Mail for Android



JohnSnow 写到:
>
>
>On 10/14/2016 05:51 AM, Xiubo Li wrote:
>> Make it a bit clear and better readable.
>>
>
>Suggestion: "Make it clearer and more readable."
>
Yes, see the next version.

>>
>> if (qemu_rbd_set_auth(cluster, secretid, errp) < 0) {
>> rados_shutdown(cluster);
>
>Did you mean to remove rados_shutdown() here, too?
>
I will fix this.

>> ret = rbd_create(io_ctx, name, bytes, &obj_order);
>> - rados_ioctx_destroy(io_ctx);
>> - rados_shutdown(cluster);
>> if (ret < 0) {
>> error_setg_errno(errp, -ret, "error rbd create");
>> - return ret;
>> }
>>
>> + rados_ioctx_destroy(io_ctx);
>> +
>> +failed_shutdown:
>
>Since this executes on the non-error pathway too, I might just call
>this
>'shutdown'.
>
Agree.

Thanks very much.

BRS
Xiubo


>> + rados_shutdown(cluster);
>> return ret;
>> }
>>
>>
>
>--
>梛s

reply via email to

[Prev in Thread] Current Thread [Next in Thread]