Received: from eggs.gnu.org ([2001:4830:134:3::10]:51423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlBDN-0007Er-Ly for qemu-devel@nongnu.org; Fri, 25 Aug 2017 05:47:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlBDJ-00080K-Q3 for qemu-devel@nongnu.org; Fri, 25 Aug 2017 05:47:45 -0400 From: Alberto Garcia In-Reply-To: <20170824120601.26963-6-el13635@mail.ntua.gr> References: <20170824120601.26963-1-el13635@mail.ntua.gr> <20170824120601.26963-6-el13635@mail.ntua.gr> Date: Fri, 25 Aug 2017 11:47:38 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 5/6] block: add throttle block filter driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Manos Pitsidianakis , qemu-devel Cc: qemu-block , Stefan Hajnoczi , Kevin Wolf On Thu 24 Aug 2017 02:06:00 PM CEST, Manos Pitsidianakis wrote: > +bool throttle_group_exists(const char *name) > +{ > + return throttle_group_by_name(name) != NULL; > +} I realized that you needed to add throttle_group_exists() after all because you need it in block/throttle.c > /* error if name is duplicate */ > - if (throttle_group_by_name(tg->name) != NULL) { > + if (throttle_group_exists(tg->name)) { > error_setg(errp, "A group with this name already exists"); > return; > } In that case you can also add it directly in patch #4 so you don't need to change this line here. But I won't oppose if you prefer to keep it like this, so either way Reviewed-by: Alberto Garcia Berto