Revision d80b60fc2433cc934533f594bfa4e2b6c6103ba3 authored by Alberto Garcia on 08 June 2018, 15:15:36 UTC, committed by Michael Roth on 21 June 2018, 01:45:06 UTC
The throttle block filter can be reopened, and with this it is possible to change the throttle group that the filter belongs to. The way the code does that is the following: - On throttle_reopen_prepare(): create a new ThrottleGroupMember and attach it to the new throttle group. - On throttle_reopen_commit(): detach the old ThrottleGroupMember, delete it and replace it with the new one. The problem with this is that by replacing the ThrottleGroupMember the previous value of io_limits_disabled is lost, causing an assertion failure in throttle_co_drain_end(). This problem can be reproduced by reopening a throttle node: $QEMU -monitor stdio -object throttle-group,id=tg0,x-iops-total=1000 \ -blockdev node-name=hd0,driver=qcow2,file.driver=file,file.filename=hd.qcow2 \ -blockdev node-name=root,driver=throttle,throttle-group=tg0,file=hd0,read-only=on (qemu) block_stream root block/throttle.c:214: throttle_co_drain_end: Assertion `tgm->io_limits_disabled' failed. Since we only want to change the throttle group on reopen there's no need to create a ThrottleGroupMember and discard the old one. It's easier if we simply detach it from its current group and attach it to the new one. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 20180608151536.7378-1-berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com> (cherry picked from commit bc33c047d1ec0b35c9cd8be62bcefae2da28654f) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
1 parent f647a4f
File | Mode | Size |
---|---|---|
installer | ||
vss-win32 | ||
Makefile.objs | -rw-r--r-- | 405 bytes |
channel-posix.c | -rw-r--r-- | 8.3 KB |
channel-win32.c | -rw-r--r-- | 9.9 KB |
channel.h | -rw-r--r-- | 964 bytes |
commands-posix.c | -rw-r--r-- | 76.6 KB |
commands-win32.c | -rw-r--r-- | 55.8 KB |
commands.c | -rw-r--r-- | 15.2 KB |
guest-agent-command-state.c | -rw-r--r-- | 1.7 KB |
guest-agent-core.h | -rw-r--r-- | 1.5 KB |
main.c | -rw-r--r-- | 42.4 KB |
qapi-schema.json | -rw-r--r-- | 33.6 KB |
service-win32.c | -rw-r--r-- | 5.5 KB |
service-win32.h | -rw-r--r-- | 868 bytes |
vss-win32.c | -rw-r--r-- | 4.5 KB |
vss-win32.h | -rw-r--r-- | 630 bytes |
Computing file changes ...