qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver
Date: Fri, 9 Sep 2016 17:37:17 +0200

On Fri, 9 Sep 2016 17:29:16 +0200
Greg Kurz <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]