Received: from eggs.gnu.org ([2001:4830:134:3::10]:53284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axxX8-0000ed-7l for qemu-devel@nongnu.org; Wed, 04 May 2016 10:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axxWw-0005qx-AM for qemu-devel@nongnu.org; Wed, 04 May 2016 10:12:04 -0400 From: Alberto Garcia In-Reply-To: <1461346962-4676-8-git-send-email-kwolf@redhat.com> References: <1461346962-4676-1-git-send-email-kwolf@redhat.com> <1461346962-4676-8-git-send-email-kwolf@redhat.com> Date: Wed, 04 May 2016 16:11:14 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 07/13] block: Move I/O throttling configuration functions to BlockBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: pbonzini@redhat.com, mreitz@redhat.com, eblake@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org On Fri 22 Apr 2016 07:42:36 PM CEST, Kevin Wolf wrote: > +void blk_set_io_limits(BlockBackend *blk, ThrottleConfig *cfg) > +{ > + throttle_group_config(blk, cfg); > +} > + > +void blk_io_limits_disable(BlockBackend *blk) > +{ > + assert(blk->public.throttle_state); > + bdrv_no_throttling_begin(blk_bs(blk)); > + throttle_group_unregister_blk(blk); > + bdrv_no_throttling_end(blk_bs(blk)); > +} > + > +/* should be called before bdrv_set_io_limits if a limit is set */ > +void blk_io_limits_enable(BlockBackend *blk, const char *group) s/bdrv_set_io_limits/blk_set_io_limits/ in the comment above. Otherwise the patch looks good to me. Reviewed-by: Alberto Garcia Berto