Message ID | 1365154342-10513-4-git-send-email-stefanha@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block.c b/block.c index 00eca27..aa16fc4 100644 --- a/block.c +++ b/block.c @@ -3867,10 +3867,7 @@ static bool bdrv_exceed_io_limits(BlockDriverState *bs, int nb_sectors, int bps_ret, iops_ret; now = qemu_get_clock_ns(vm_clock); - if ((bs->slice_start < now) - && (bs->slice_end > now)) { - bs->slice_end = now + BLOCK_IO_SLICE_TIME; - } else { + if (now > bs->slice_end) { bs->slice_start = now; bs->slice_end = now + BLOCK_IO_SLICE_TIME; memset(&bs->slice_submitted, 0, sizeof(bs->slice_submitted));