Re: [PATCH] qemu-img: add support for rate limit in qemu-img convert

2020-10-19 Thread Eric Blake

On 10/18/20 1:34 AM, Zhengui li wrote:

From: Zhengui 

Currently, there is no rate limit for qemu-img convert. This may
cause the task of qemu-img convert 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 convert to get better quality of sevice.



service

Also, I'd suggest bundling your related patches into a 0/N series (it 
took me a while to notice that you had two separate emails, one for 
commit and one for convert, sent at nearly the same time, because the 
subject line was long enough to truncate the important part in my view-pane)



Signed-off-by: Zhengui 
---
  qemu-img-cmds.hx |  4 ++--
  qemu-img.c   | 34 +-
  2 files changed, 35 insertions(+), 3 deletions(-)



--
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




Re: [PATCH] qemu-img: add support for rate limit in qemu-img convert

2020-10-19 Thread Alberto Garcia
On Sun 18 Oct 2020 08:34:39 AM CEST, Zhengui li wrote:
> @@ -2729,6 +2757,10 @@ out:
>  qemu_opts_del(opts);
>  qemu_opts_free(create_opts);
>  qemu_opts_del(sn_opts);
> +if (s.target && rate_limit &&
> +blk_get_public(s.target)->throttle_group_member.throttle_state) {
> +blk_io_limits_disable(s.target);
> +}
>  qobject_unref(open_opts);
>  blk_unref(s.target);
>  if (s.src) {

Apart from the comments that I wrote to the other patch, which also
apply to this one, blk_delete() already calls blk_io_limits_disable() so
I don't think you need to do it manually here.

Berto



Re: [PATCH] qemu-img: add support for rate limit in qemu-img convert

2020-10-17 Thread no-reply
Patchew URL: 
https://patchew.org/QEMU/1602999390-21324-1-git-send-email-lizhen...@huawei.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1602999390-21324-1-git-send-email-lizhen...@huawei.com
Subject: [PATCH] qemu-img: add support for rate limit in qemu-img convert

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag] 
patchew/1602999390-21324-1-git-send-email-lizhen...@huawei.com -> 
patchew/1602999390-21324-1-git-send-email-lizhen...@huawei.com
Switched to a new branch 'test'
c39672c qemu-img: add support for rate limit in qemu-img convert

=== OUTPUT BEGIN ===
ERROR: consider using qemu_strtoull in preference to strtoull
#94: FILE: qemu-img.c:2336:
+unsigned long long sval = strtoull(optarg, , 10);

total: 1 errors, 0 warnings, 94 lines checked

Commit c39672c23e5d (qemu-img: add support for rate limit in qemu-img convert) 
has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1602999390-21324-1-git-send-email-lizhen...@huawei.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-de...@redhat.com