[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] bug introduced by "block: Move throttling fields from B
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] bug introduced by "block: Move throttling fields from BDS to BB" |
Date: |
Mon, 17 Oct 2016 10:49:26 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 14 Oct 2016 04:11:46 PM CEST, Paolo Bonzini wrote:
> Here is next_throttle_token:
>
> - ThrottleGroup *tg = container_of(blk_bs(blk)->throttle_state,
> - ThrottleGroup, ts);
> + BlockBackendPublic *blkp = blk_get_public(blk);
> + ThrottleGroup *tg = container_of(blkp->throttle_state, ThrottleGroup,
> ts);
> BlockBackend *token, *start;
>
> start = token = tg->tokens[is_write];
>
> /* get next bs round in round robin style */
> token = throttle_group_next_blk(token);
> - while (token != start && !blk_bs(token)->pending_reqs[is_write]) {
> + while (token != start && !blkp->pending_reqs[is_write]) {
> token = throttle_group_next_blk(token);
> }
>
>
> blkp isn't updated every time token is updated.
You're right, I'll write a patch. I'd also try to check why this was not
detected by any iotest.
Thanks!
Berto