throttle.c (880953493386a69416d2e1cdc063c670585a03ac) | throttle.c (9a5a1c621ed72161abcf461d46c7b7b7f97938bf) |
---|---|
1/* 2 * QEMU block throttling filter driver infrastructure 3 * 4 * Copyright (c) 2017 Manos Pitsidianakis 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 or --- 130 unchanged lines hidden (view full) --- 139 BdrvRequestFlags flags) 140{ 141 ThrottleGroupMember *tgm = bs->opaque; 142 throttle_group_co_io_limits_intercept(tgm, bytes, true); 143 144 return bdrv_co_pwrite_zeroes(bs->file, offset, bytes, flags); 145} 146 | 1/* 2 * QEMU block throttling filter driver infrastructure 3 * 4 * Copyright (c) 2017 Manos Pitsidianakis 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 or --- 130 unchanged lines hidden (view full) --- 139 BdrvRequestFlags flags) 140{ 141 ThrottleGroupMember *tgm = bs->opaque; 142 throttle_group_co_io_limits_intercept(tgm, bytes, true); 143 144 return bdrv_co_pwrite_zeroes(bs->file, offset, bytes, flags); 145} 146 |
147static int coroutine_fn throttle_co_pdiscard(BlockDriverState *bs, 148 int64_t offset, int64_t bytes) | 147static int coroutine_fn GRAPH_RDLOCK 148throttle_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) |
149{ 150 ThrottleGroupMember *tgm = bs->opaque; 151 throttle_group_co_io_limits_intercept(tgm, bytes, true); 152 153 return bdrv_co_pdiscard(bs->file, offset, bytes); 154} 155 156static int coroutine_fn throttle_co_pwritev_compressed(BlockDriverState *bs, --- 122 unchanged lines hidden --- | 149{ 150 ThrottleGroupMember *tgm = bs->opaque; 151 throttle_group_co_io_limits_intercept(tgm, bytes, true); 152 153 return bdrv_co_pdiscard(bs->file, offset, bytes); 154} 155 156static int coroutine_fn throttle_co_pwritev_compressed(BlockDriverState *bs, --- 122 unchanged lines hidden --- |