[PATCH v3 1/2] qemu-img: add support for rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img commit. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 4 +++- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 11 +-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/tools/qemu-img.rst b/docs

[PATCH v3 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img convert. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 6 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 27 ++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/tools/

[PATCH v3 0/2] qemu-img: add support for rate limit in commit and convert

2020-10-20 Thread Zhengui li
support for rate limit in qemu-img commit and convert to get better quality of sevice. Zhengui Li (2): qemu-img: add support for rate limit in qemu-img commit qemu-img: add support for rate limit in qemu-img convert docs/tools/qemu-img.rst | 10 -- qemu-img-cmds.hx| 8

[PATCH v2 0/2] qemu-img: add add support for rate limit in commit and convert

2020-10-20 Thread Zhengui li
support for rate limit in qemu-img commit and convert to get better quality of sevice. Zhengui Li (2): qemu-img: add support for rate limit in qemu-img commit qemu-img: add support for rate limit in qemu-img convert docs/tools/qemu-img.rst | 10 -- qemu-img-cmds.hx| 8

[PATCH v2 1/2] qemu-img: add support for rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img commit. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 4 +++- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 11 +-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/tools/qemu-img.rst b/docs

[PATCH v2 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
From: Zhengui add support for rate limit in qemu-img convert. Signed-off-by: Zhengui --- docs/tools/qemu-img.rst | 6 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 27 ++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/tools/

[PATCH v2 1/2] qemu-img: add support for offline rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui 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 i

[PATCH v2 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
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

[PATCH v2 4/6] virtio-gpu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/display/virtio-gpu.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw

[PATCH v2 5/6] virtio-iommu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/virtio/virtio-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index

[PATCH v2 6/6] vfio: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/vfio/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 13471ae..acc3356 100644 --- a

[PATCH v2 3/6] vhost-user: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/virtio/vhost-user.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index

[PATCH v2 2/6] vhost-user-scsi: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib

[PATCH v2 1/6] vhost-user-gpu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- contrib/vhost-user-gpu/vhost-user-gpu.c | 34 - 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/vhost-user

[PATCH] virtio-iommu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/virtio/virtio-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index

[PATCH] vfio: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/vfio/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 13471ae..acc3356 100644 --- a

[PATCH] vhost-user: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/virtio/vhost-user.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index

[PATCH] virtio-gpu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- hw/display/virtio-gpu.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw

[PATCH] vhost-user-scsi: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib

[PATCH] vhost-user-gpu: fix incorrect print type

2020-10-19 Thread Zhengui li
The type of input variable is unsigned int while the printer type is int. So fix incorrect print type. Signed-off-by: Zhengui li --- contrib/vhost-user-gpu/vhost-user-gpu.c | 34 - 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/vhost-user

[PATCH] vfio: fix incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- hw/vfio/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 13471ae..acc3356 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -203,7 +203,7 @@ void vfio_region_write(void *opaque, hwaddr add

[PATCH] virtio-gpu: fix incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- hw/display/virtio-gpu.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 90be4e3..d785d88 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @

[PATCH] virtio-iommu: fix incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- hw/virtio/virtio-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 21ec63b..bd6ce44 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -632,7 +632,7 @@ stati

[PATCH] vhost-user-scsi: fix incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c index 3c91238..1527ffd 100644 --- a/contrib/vhost-user-scsi/vhost-user-

[PATCH] vhost-user: fix incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- hw/virtio/vhost-user.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 9c5b4f7..db563bd 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -308,7 +308,7 @@ static int

[PATCH] vhost-user-gpu: incorrect print type

2020-10-19 Thread Zhengui li
fix incorrect print type. --- contrib/vhost-user-gpu/vhost-user-gpu.c | 34 - 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c index a019d0a..ee2bf59 100644 --- a/contr

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

2020-10-17 Thread Zhengui li
From: Zhengui 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 i

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

2020-10-17 Thread Zhengui li
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

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

2020-10-17 Thread Zhengui li
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

[PATCH] qemu-img: add support for offline rate limit in qemu-img commit

2020-10-17 Thread Zhengui li
From: Zhengui 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 i

[Qemu-devel] [PATCH] file-posix: unlock qemu_global_mutex before pread when attach disk

2019-06-10 Thread Zhengui li
virtual machine cpu soft lockup when attach a disk to the vm in the case that backend storage network has a large delay or IO pressure is too large. The bt of qemu main thread: #0 0x9d78402c in pread64 () from /lib64/libpthread.so.0 #1 0xce3357d8 in pread64 (__offset=0, __nbytes=40

[Qemu-devel] [PATCH] qemu-pr-helper: check the return value of fcntl in do_pr_out

2019-03-20 Thread Zhengui li
The function fcntl maybe return -1, which is not a unsigned type. Unsigned type or Negative values should not do bitwise operator with O_ACCMODE. Signed-off-by: Zhengui li --- scsi/qemu-pr-helper.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scsi/qemu-pr-helper.c

[Qemu-devel] [PATCH] qemu-pr-helper: check the return value of fcntl in do_pr_out

2019-03-20 Thread Zhengui li
The function fcntl maybe return -1, which is not a unsigned type. Unsigned type or Negative values should not do bitwise operator with O_ACCMODE. Signed-off-by: Zhengui li --- scsi/qemu-pr-helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scsi/qemu-pr-helper.c

[Qemu-devel] [PATCH] vpc: unlock Coroutine lock to make IO submit Concurrently

2019-03-15 Thread Zhengui li
Concurrent IO becomes serial IO because of the qemu Coroutine lock, which reduce IO performance severely. So unlock Coroutine lock before bdrv_co_pwritev and bdrv_co_preadv to fix it. Signed-off-by: Zhengui li --- block/vpc.c | 4 1 file changed, 4 insertions(+) diff --git a/block/vpc.c

[Qemu-devel] [PATCH] scsi-disk: Fix crash if request is invaild or disk is no medium

2019-03-07 Thread Zhengui li
From: Zhengui Li Qemu will crash with the assertion error that "assert(r->req.aiocb != NULL)" in scsi_read_complete if request is invaild or disk is no medium. The error is below: qemu-kvm: hw/scsi/scsi_disk.c:299: scsi_read_complete: Assertion `r->req.aiocb != NULL' fail

[Qemu-devel] [PATCH] scsi-disk: Fix crash if request is invaild or disk is no medium

2019-03-07 Thread Zhengui li
From: Zhengui Li Qemu will crash with the assertion error that "assert(r->req.aiocb != NULL)" in scsi_read_complete if request is invaild or disk is no medium. The error is below: qemu-kvm: hw/scsi/scsi_disk.c:299: scsi_read_complete: Assertion `r->req.aiocb != NULL' fail

[Qemu-devel] [PATCH] block: all I/O should be completed before removing throttle timers.

2017-10-20 Thread Zhengui Li
From: Zhengui In blk_remove_bs, all I/O should be completed before removing throttle timers. If there has inflight I/O, removing throttle timers here will cause the inflight I/O never return. This patch add bdrv_drained_begin before throttle_timers_detach_aio_context to let all I/O completed befo

[Qemu-devel] [PATCH] bdrv_inc_in_flight and bdrv_dec_in_flight:

2017-06-10 Thread Zhengui Li
Avoid empty pointer access if the bs is NULL. Signed-off-by: Zhengui Li --- block/io.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/block/io.c b/block/io.c index ed31810..b12d7cf 100644 --- a/block/io.c +++ b/block/io.c @@ -492,7 +492,9 @@ static bool