Lines Matching refs:bs

76 static int throttle_open(BlockDriverState *bs, QDict *options,  in throttle_open()  argument
79 ThrottleGroupMember *tgm = bs->opaque; in throttle_open()
83 ret = bdrv_open_file_child(NULL, options, "file", bs, errp); in throttle_open()
90 bs->supported_write_flags = bs->file->bs->supported_write_flags | in throttle_open()
92 bs->supported_zero_flags = bs->file->bs->supported_zero_flags | in throttle_open()
98 throttle_group_register_tgm(tgm, group, bdrv_get_aio_context(bs)); in throttle_open()
105 static void throttle_close(BlockDriverState *bs) in throttle_close() argument
107 ThrottleGroupMember *tgm = bs->opaque; in throttle_close()
113 throttle_co_getlength(BlockDriverState *bs) in throttle_co_getlength() argument
115 return bdrv_co_getlength(bs->file->bs); in throttle_co_getlength()
119 throttle_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_preadv() argument
123 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_preadv()
126 return bdrv_co_preadv(bs->file, offset, bytes, qiov, flags); in throttle_co_preadv()
130 throttle_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_pwritev() argument
133 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_pwritev()
136 return bdrv_co_pwritev(bs->file, offset, bytes, qiov, flags); in throttle_co_pwritev()
140 throttle_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_pwrite_zeroes() argument
143 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_pwrite_zeroes()
146 return bdrv_co_pwrite_zeroes(bs->file, offset, bytes, flags); in throttle_co_pwrite_zeroes()
150 throttle_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in throttle_co_pdiscard() argument
152 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_pdiscard()
155 return bdrv_co_pdiscard(bs->file, offset, bytes); in throttle_co_pdiscard()
159 throttle_co_pwritev_compressed(BlockDriverState *bs, int64_t offset, in throttle_co_pwritev_compressed() argument
162 return throttle_co_pwritev(bs, offset, bytes, qiov, in throttle_co_pwritev_compressed()
166 static int coroutine_fn GRAPH_RDLOCK throttle_co_flush(BlockDriverState *bs) in throttle_co_flush() argument
168 return bdrv_co_flush(bs->file->bs); in throttle_co_flush()
171 static void throttle_detach_aio_context(BlockDriverState *bs) in throttle_detach_aio_context() argument
173 ThrottleGroupMember *tgm = bs->opaque; in throttle_detach_aio_context()
177 static void throttle_attach_aio_context(BlockDriverState *bs, in throttle_attach_aio_context() argument
180 ThrottleGroupMember *tgm = bs->opaque; in throttle_attach_aio_context()
191 assert(reopen_state->bs != NULL); in throttle_reopen_prepare()
200 BlockDriverState *bs = reopen_state->bs; in throttle_reopen_commit() local
201 ThrottleGroupMember *tgm = bs->opaque; in throttle_reopen_commit()
208 throttle_group_register_tgm(tgm, group, bdrv_get_aio_context(bs)); in throttle_reopen_commit()
220 static void throttle_drain_begin(BlockDriverState *bs) in throttle_drain_begin() argument
222 ThrottleGroupMember *tgm = bs->opaque; in throttle_drain_begin()
228 static void throttle_drain_end(BlockDriverState *bs) in throttle_drain_end() argument
230 ThrottleGroupMember *tgm = bs->opaque; in throttle_drain_end()