[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] qemu-img: add support for offline rate limit in qemu-
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v2 1/2] qemu-img: add support for offline rate limit in qemu-img commit |
Date: |
Tue, 20 Oct 2020 14:10:35 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 20 Oct 2020 01:39:05 PM CEST, Zhengui li wrote:
> From: Zhengui <lizhengui@huawei.com>
>
> Currently, there is no rate limit for qemu-img commit. This may
> cause the task of qemu-img commit to consume all the bandwidth
> of the storage. This will affect the IO performance of other processes
> and virtual machines under shared storage. So we add support for
> offline rate limit in qemu-img commit to get better quality of sevice.
>
> Signed-off-by: Zhengui <lizhengui@huawei.com>
Thanks for the patch!
When you send more than one patch you should add a cover letter (you can
use git format-patch --cover-letter).
See
https://wiki.qemu.org/Contribute/SubmitAPatch#Include_a_meaningful_cover_letter
> + case 'r': {
> + int64_t sval;
> +
> + sval = cvtnum("rate limit", optarg);
> + if (sval < 0) {
> + return 1;
> + }
> + rate_limit = sval;
> + } break;
I don't think you need sval here, do you?
rate_limit = cvtnum(...);
if (rate_limit < 0) {
return 1;
}
Like that you can also get rid of the extra braces { }
Other than that the patch looks correct.
With that changed,
Reviewed-by: Alberto Garcia <berto@igalia.com>
Berto