Bug 890024
Summary: | Guest should failed to be booted if specifying iops,bps as negative value | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | juzhang <juzhang> | |
Component: | qemu-kvm | Assignee: | Stefan Hajnoczi <stefanha> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | low | Docs Contact: | ||
Priority: | low | |||
Version: | 7.0 | CC: | armbru, hhuang, juzhang, knoel, michen, qzhang, sluo, virt-maint | |
Target Milestone: | rc | Keywords: | FutureFeature | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | 1.5 | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 987725 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 11:46:13 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 987725 |
Description
juzhang
2012-12-24 12:00:58 UTC
Additional info: Can we add a similar function for checking iops/iops_wr/iops_rd/bsp_wr/bps_rd/bps value like bool do_check_io_limits? snip code of source #vi blockdev.c static bool do_check_io_limits(BlockIOLimit *io_limits) { bool bps_flag; bool iops_flag; assert(io_limits); bps_flag = (io_limits->bps[BLOCK_IO_LIMIT_TOTAL] != 0) && ((io_limits->bps[BLOCK_IO_LIMIT_READ] != 0) || (io_limits->bps[BLOCK_IO_LIMIT_WRITE] != 0)); iops_flag = (io_limits->iops[BLOCK_IO_LIMIT_TOTAL] != 0) && ((io_limits->iops[BLOCK_IO_LIMIT_READ] != 0) || (io_limits->iops[BLOCK_IO_LIMIT_WRITE] != 0)); if (bps_flag || iops_flag) { return false; } return true; } if (!do_check_io_limits(&io_limits)) { error_report("bps(iops) and bps_rd/bps_wr(iops_rd/iops_wr) " "cannot be used at the same time"); return NULL; } Thanks for reporting this bug and your suggestions. I have posted a patch series upstream: http://thread.gmane.org/gmane.comp.emulators.qemu/194315 Once it has been merged I will backport for RHEL 7, if necessary. Fixed upstream, will be available in QEMU 1.5. commit 7d81c1413c9c9bdcc966453636e4ca7776b59861 Author: Stefan Hajnoczi <stefanha> Date: Wed Feb 13 16:53:43 2013 +0100 block: refuse negative iops and bps values Reproduce this issue on qemu-kvm-1.4.0-4.el7, it can boot guest with specifying iops,bps as negative value. host info: kernel-3.9.0-0.55.el7.x86_64 qemu-kvm-1.4.0-4.el7 Steps: e.g:...-drive file=/mnt/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,readonly=on,cache=none,aio=native,werror=stop,rerror=stop,bps=-102400000,iops=-100000 -device virtio-blk-pci,bus=pcie.0,addr=0x7,drive=drive-data-disk,id=data-disk Results: it can boot guest with specifying iops,bps as negative value. (qemu) info block drive-system-disk: removable=0 io-status=ok file=/mnt/RHEL-7.0-20130403.0_x86_64.qcow3bk ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-data-disk: removable=0 io-status=ok file=/mnt/my-data-disk.qcow2 ro=1 drv=qcow2 encrypted=0 bps=-102400000 bps_rd=0 bps_wr=0 iops=-100000 iops_rd=0 iops_wr=0 Verify this issue on qemu-kvm-1.5.0-1.el7.x86_64. hot info: kernel-3.9.0-0.55.el7.x86_64 qemu-kvm-1.5.0-1.el7.x86_64 guest info: kernel-3.9.0-0.55.el7.x86_64 Result: It fail to boot guest with specifying iops,bps as negative value, and qemu give a friendly reminds. qemu-kvm: -drive file=/mnt/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,readonly=on,cache=none,aio=native,werror=stop,rerror=stop,bps=-102400000,iops=-100000: bps and iops values must be 0 or greater Base on above, this issue has been fixed successfully. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |