On Tue 20 Oct 2020 01:39:05 PM CEST, Zhengui li wrote: > From: Zhengui <lizhen...@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 <lizhen...@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 <be...@igalia.com> Berto