From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw5wA-0004TQ-A8 for qemu-devel@nongnu.org; Mon, 17 Oct 2016 07:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw5w9-0003Sh-Ee for qemu-devel@nongnu.org; Mon, 17 Oct 2016 07:18:34 -0400 Date: Mon, 17 Oct 2016 13:18:26 +0200 From: Kevin Wolf Message-ID: <20161017111826.GD4821@noname.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] bug introduced by "block: Move throttling fields from BDS to BB" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Paolo Bonzini , qemu-devel , qemu block Am 17.10.2016 um 10:49 hat Alberto Garcia geschrieben: > 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! Thanks a lot, Berto! (Both for fixing my bug and thinking of test cases) Kevin