On 10/07/2017 15:21, Stefan Hajnoczi wrote: > On Thu, Jul 06, 2017 at 06:38:18PM +0200, Paolo Bonzini wrote: >> Code refactoring only. >> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> >> --- >> block/write-threshold.c | 28 ++++++++++++++++------------ >> 1 file changed, 16 insertions(+), 12 deletions(-) >> >> diff --git a/block/write-threshold.c b/block/write-threshold.c >> index 0bd1a01c86..c8ebc32b4d 100644 >> --- a/block/write-threshold.c >> +++ b/block/write-threshold.c >> @@ -37,18 +37,22 @@ static void write_threshold_disable(BlockDriverState *bs) >> } >> } >> >> +static uint64_t exceeded_amount(const BdrvTrackedRequest *req, >> + uint64_t thres) > > Not a reason to respin, but I would prefer a more specific name so the > intent of the code is easier to understand: exceeded_threshold() instead > of exceeded_amount(). > > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
It's the amount by which the request exceeds threshold... Not sure what name would be best. Paolo
signature.asc
Description: OpenPGP digital signature