]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: filter blkio 0-device-weight at two other places
authorHu Tao <hutao@cn.fujitsu.com>
Wed, 30 Nov 2011 02:11:08 +0000 (10:11 +0800)
committerEric Blake <eblake@redhat.com>
Wed, 30 Nov 2011 19:34:30 +0000 (12:34 -0700)
commit25a5f07c69fb33c00dba0bef974277a6092663a2
treee55716541af3141ff763576c4fe797a5b6c71b3b
parent22cf6d46f444573aafcc977b466253ec9b42cd13
qemu: filter blkio 0-device-weight at two other places

filter 0-device-weight when:

  - getting blkio parameters with --config
  - starting up a domain

When testing with blkio, I found these issues:

  (dom is down)
  virsh blkiotune dom --device-weights /dev/sda,300,/dev/sdb,500
  virsh blkiotune dom --device-weights /dev/sda,300,/dev/sdb,0
  virsh blkiotune dom
  weight         : 800
  device_weight  : /dev/sda,200,/dev/sdb,0

  # issue 1: shows 0 device weight of /dev/sdb that may confuse user

  (continued)
  virsh start dom

  # issue 2: If /dev/sdb doesn't exist, libvirt refuses to bring the
  # dom up because it wants to set the device weight to 0 of a
  # non-existing device. Since 0 means no weight-limit, we really don't
  # have to set it.
src/qemu/qemu_cgroup.c
src/qemu/qemu_driver.c