[PATCH] block: Change write_threshold to uint64 in BlockDeviceInfo
From:
Yi Wang
Subject:
[PATCH] block: Change write_threshold to uint64 in BlockDeviceInfo
Date:
Tue, 2 Mar 2021 10:06:08 +0800
From: renlei4 <ren.lei4@zte.com.cn>
write_threshold is saved as uint64, but BlockDeviceInfo use int to describe it.
normally it works well if threshold less than max int: # virsh domblkthreshold v6_163 sda 9223372036854775807 # virsh qemu-monitor-command v6_163 '{ "execute": "query-named-block-nodes" }' |grep threshold "write_threshold": 9223372036854775807,
overflow happened if threshold greater than max int: # virsh domblkthreshold v6_163 sda 9223372036854775811 # virsh qemu-monitor-command v6_163 '{ "execute": "query-named-block-nodes" }' |grep threshold "write_threshold": -9223372036854775805,
Fixes: e2462113b200 "block: add event when disk usage exceeds threshold"
Signed-off-by: Ren Lei <ren.lei4@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
--- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)