block: move ThrottleGroup membership to ThrottleGroupMember
This commit eliminates the 1:1 relationship between BlockBackend and throttle group state. Users will be able to create multiple throttle nodes, each with its own throttle group state, in the future. The throttle group state cannot be per-BlockBackend anymore, it must be per-throttle node. This is done by gathering ThrottleGroup membership details from BlockBackendPublic into ThrottleGroupMember and refactoring existing code to use the structure. Reviewed-by:Alberto Garcia <berto@igalia.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Showing
- block/block-backend.c 37 additions, 29 deletionsblock/block-backend.c
- block/qapi.c 5 additions, 3 deletionsblock/qapi.c
- block/throttle-groups.c 144 additions, 144 deletionsblock/throttle-groups.c
- blockdev.c 2 additions, 2 deletionsblockdev.c
- include/block/throttle-groups.h 32 additions, 7 deletionsinclude/block/throttle-groups.h
- include/sysemu/block-backend.h 3 additions, 17 deletionsinclude/sysemu/block-backend.h
- tests/test-throttle.c 29 additions, 24 deletionstests/test-throttle.c
Loading
Please register or sign in to comment