From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biNrt-0008Lh-C2 for qemu-devel@nongnu.org; Fri, 09 Sep 2016 11:37:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biNrq-0002Lz-6M for qemu-devel@nongnu.org; Fri, 09 Sep 2016 11:37:29 -0400 Received: from 6.mo68.mail-out.ovh.net ([46.105.63.100]:34145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biNrp-0002Lr-WD for qemu-devel@nongnu.org; Fri, 09 Sep 2016 11:37:26 -0400 Received: from player778.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 1EAA5FF8D28 for ; Fri, 9 Sep 2016 17:37:25 +0200 (CEST) Date: Fri, 9 Sep 2016 17:37:17 +0200 From: Greg Kurz Message-ID: <20160909173717.4ed9cd13@bahia> In-Reply-To: <20160909172916.3cefb8f2@bahia> References: <1473412227-23381-1-git-send-email-pradeep.jagadeesh@huawei.com> <20160909172916.3cefb8f2@bahia> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pradeep Jagadeesh Cc: Alberto Garcia , Claudio Fontana , qemu-devel@nongnu.org, "Aneesh Kumar K.V" , Pradeep Jagadeesh On Fri, 9 Sep 2016 17:29:16 +0200 Greg Kurz wrote: > > +bool throttle9p_get_io_limits_state(FsThrottle *fst) > > The name looks a bit strange, since this helper simply returns a boolean flag. > I guess throttle9p_enabled() is enough. > > > +{ > > + > > + return fst->io_limits_enabled; > > +} > > + And this could be an inline function in 9p-throttle.h. > [...] > > + if (!throttle_is_valid(&fst->cfg, NULL)) { > > You should pass an Error * to throttle_is_valid() to be able to report the Read Error ** :) > misconfiguration to the user. I guess it is okay to print it here using > error_repport_err() (see include/qapi/error.h) and return -1. > Cheers. -- Greg