JohnSnow <[email protected]>写到:
>
>
>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