Lines Matching refs:bs
80 static int null_open(BlockDriverState *bs, QDict *options, int flags, in null_open() argument
84 BDRVNullState *s = bs->opaque; in null_open()
99 bs->supported_write_flags = BDRV_REQ_FUA; in null_open()
103 static int64_t coroutine_fn null_co_getlength(BlockDriverState *bs) in null_co_getlength() argument
105 BDRVNullState *s = bs->opaque; in null_co_getlength()
109 static coroutine_fn int null_co_common(BlockDriverState *bs) in null_co_common() argument
111 BDRVNullState *s = bs->opaque; in null_co_common()
119 static coroutine_fn int null_co_preadv(BlockDriverState *bs, in null_co_preadv() argument
124 BDRVNullState *s = bs->opaque; in null_co_preadv()
130 return null_co_common(bs); in null_co_preadv()
133 static coroutine_fn int null_co_pwritev(BlockDriverState *bs, in null_co_pwritev() argument
138 return null_co_common(bs); in null_co_pwritev()
141 static coroutine_fn int null_co_flush(BlockDriverState *bs) in null_co_flush() argument
143 return null_co_common(bs); in null_co_flush()
170 static inline BlockAIOCB *null_aio_common(BlockDriverState *bs, in null_aio_common() argument
175 BDRVNullState *s = bs->opaque; in null_aio_common()
177 acb = qemu_aio_get(&null_aiocb_info, bs, cb, opaque); in null_aio_common()
180 aio_timer_init(bdrv_get_aio_context(bs), &acb->timer, in null_aio_common()
186 replay_bh_schedule_oneshot_event(bdrv_get_aio_context(bs), in null_aio_common()
192 static BlockAIOCB *null_aio_preadv(BlockDriverState *bs, in null_aio_preadv() argument
198 BDRVNullState *s = bs->opaque; in null_aio_preadv()
204 return null_aio_common(bs, cb, opaque); in null_aio_preadv()
207 static BlockAIOCB *null_aio_pwritev(BlockDriverState *bs, in null_aio_pwritev() argument
213 return null_aio_common(bs, cb, opaque); in null_aio_pwritev()
216 static BlockAIOCB *null_aio_flush(BlockDriverState *bs, in null_aio_flush() argument
220 return null_aio_common(bs, cb, opaque); in null_aio_flush()
229 static int coroutine_fn null_co_block_status(BlockDriverState *bs, in null_co_block_status() argument
235 BDRVNullState *s = bs->opaque; in null_co_block_status()
240 *file = bs; in null_co_block_status()
248 static void null_refresh_filename(BlockDriverState *bs) in null_refresh_filename() argument
252 for (e = qdict_first(bs->full_open_options); e; in null_refresh_filename()
253 e = qdict_next(bs->full_open_options, e)) in null_refresh_filename()
264 snprintf(bs->exact_filename, sizeof(bs->exact_filename), "%s://", in null_refresh_filename()
265 bs->drv->format_name); in null_refresh_filename()
269 null_co_get_allocated_file_size(BlockDriverState *bs) in null_co_get_allocated_file_size() argument