qemu-fsdev-throttle.h (9514f2648ca05b38e852b490a12b8cd98d5808c1) | qemu-fsdev-throttle.h (e688df6bc4549f28534cdb001f168b8caae55b0c) |
---|---|
1/* 2 * Fsdev Throttle 3 * 4 * Copyright (C) 2016 Huawei Technologies Duesseldorf GmbH 5 * 6 * Author: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> 7 * 8 * This work is licensed under the terms of the GNU GPL, version 2 or --- 4 unchanged lines hidden (view full) --- 13 */ 14 15#ifndef _FSDEV_THROTTLE_H 16#define _FSDEV_THROTTLE_H 17 18#include "block/aio.h" 19#include "qemu/main-loop.h" 20#include "qemu/coroutine.h" | 1/* 2 * Fsdev Throttle 3 * 4 * Copyright (C) 2016 Huawei Technologies Duesseldorf GmbH 5 * 6 * Author: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> 7 * 8 * This work is licensed under the terms of the GNU GPL, version 2 or --- 4 unchanged lines hidden (view full) --- 13 */ 14 15#ifndef _FSDEV_THROTTLE_H 16#define _FSDEV_THROTTLE_H 17 18#include "block/aio.h" 19#include "qemu/main-loop.h" 20#include "qemu/coroutine.h" |
21#include "qapi/error.h" | |
22#include "qemu/throttle.h" 23 24typedef struct FsThrottle { 25 ThrottleState ts; 26 ThrottleTimers tt; 27 ThrottleConfig cfg; 28 CoQueue throttled_reqs[2]; 29} FsThrottle; 30 31void fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **); 32 33void fsdev_throttle_init(FsThrottle *); 34 35void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool , 36 struct iovec *, int); 37 38void fsdev_throttle_cleanup(FsThrottle *); 39#endif /* _FSDEV_THROTTLE_H */ | 21#include "qemu/throttle.h" 22 23typedef struct FsThrottle { 24 ThrottleState ts; 25 ThrottleTimers tt; 26 ThrottleConfig cfg; 27 CoQueue throttled_reqs[2]; 28} FsThrottle; 29 30void fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **); 31 32void fsdev_throttle_init(FsThrottle *); 33 34void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool , 35 struct iovec *, int); 36 37void fsdev_throttle_cleanup(FsThrottle *); 38#endif /* _FSDEV_THROTTLE_H */ |