Lines Matching refs:bs

39 cor_open(BlockDriverState *bs, QDict *options, int flags, Error **errp)  in cor_open()  argument
42 BDRVStateCOR *state = bs->opaque; in cor_open()
49 ret = bdrv_open_file_child(NULL, options, "file", bs, errp); in cor_open()
56 bs->supported_read_flags = BDRV_REQ_PREFETCH; in cor_open()
58 bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | in cor_open()
59 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in cor_open()
61 bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | in cor_open()
63 bs->file->bs->supported_zero_flags); in cor_open()
84 if (bdrv_freeze_backing_chain(bs, bottom_bs, errp) < 0) { in cor_open()
111 static void cor_child_perm(BlockDriverState *bs, BdrvChild *c, in cor_child_perm() argument
122 if (!(bs->open_flags & BDRV_O_INACTIVE)) { in cor_child_perm()
128 static int64_t coroutine_fn GRAPH_RDLOCK cor_co_getlength(BlockDriverState *bs) in cor_co_getlength() argument
130 return bdrv_co_getlength(bs->file->bs); in cor_co_getlength()
135 cor_co_preadv_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_preadv_part() argument
142 BDRVStateCOR *state = bs->opaque; in cor_co_preadv_part()
145 return bdrv_co_preadv_part(bs->file, offset, bytes, qiov, qiov_offset, in cor_co_preadv_part()
153 ret = bdrv_co_is_allocated(bs->file->bs, offset, bytes, &n); in cor_co_preadv_part()
155 ret = bdrv_co_is_allocated_above(bdrv_backing_chain_next(bs->file->bs), in cor_co_preadv_part()
170 ret = bdrv_co_preadv_part(bs->file, offset, n, qiov, qiov_offset, in cor_co_preadv_part()
187 cor_co_pwritev_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwritev_part() argument
191 return bdrv_co_pwritev_part(bs->file, offset, bytes, qiov, qiov_offset, in cor_co_pwritev_part()
197 cor_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwrite_zeroes() argument
200 return bdrv_co_pwrite_zeroes(bs->file, offset, bytes, flags); in cor_co_pwrite_zeroes()
205 cor_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in cor_co_pdiscard() argument
207 return bdrv_co_pdiscard(bs->file, offset, bytes); in cor_co_pdiscard()
212 cor_co_pwritev_compressed(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwritev_compressed() argument
215 return bdrv_co_pwritev(bs->file, offset, bytes, qiov, in cor_co_pwritev_compressed()
221 cor_co_eject(BlockDriverState *bs, bool eject_flag) in cor_co_eject() argument
223 bdrv_co_eject(bs->file->bs, eject_flag); in cor_co_eject()
228 cor_co_lock_medium(BlockDriverState *bs, bool locked) in cor_co_lock_medium() argument
230 bdrv_co_lock_medium(bs->file->bs, locked); in cor_co_lock_medium()
234 static void GRAPH_UNLOCKED cor_close(BlockDriverState *bs) in cor_close() argument
236 BDRVStateCOR *s = bs->opaque; in cor_close()
243 bdrv_unfreeze_backing_chain(bs, s->bottom_bs); in cor_close()