Lines Matching refs:bs
70 BlockDriverState *bs; member
224 static void coroutine_fn nfs_co_init_task(BlockDriverState *bs, NFSRPC *task) in nfs_co_init_task() argument
228 .bs = bs, in nfs_co_init_task()
229 .client = bs->opaque, in nfs_co_init_task()
263 static int coroutine_fn nfs_co_preadv(BlockDriverState *bs, int64_t offset, in nfs_co_preadv() argument
267 NFSClient *client = bs->opaque; in nfs_co_preadv()
270 nfs_co_init_task(bs, &task); in nfs_co_preadv()
297 static int coroutine_fn nfs_co_pwritev(BlockDriverState *bs, int64_t offset, in nfs_co_pwritev() argument
301 NFSClient *client = bs->opaque; in nfs_co_pwritev()
306 nfs_co_init_task(bs, &task); in nfs_co_pwritev()
346 static int coroutine_fn nfs_co_flush(BlockDriverState *bs) in nfs_co_flush() argument
348 NFSClient *client = bs->opaque; in nfs_co_flush()
351 nfs_co_init_task(bs, &task); in nfs_co_flush()
368 static void nfs_detach_aio_context(BlockDriverState *bs) in nfs_detach_aio_context() argument
370 NFSClient *client = bs->opaque; in nfs_detach_aio_context()
377 static void nfs_attach_aio_context(BlockDriverState *bs, in nfs_attach_aio_context() argument
380 NFSClient *client = bs->opaque; in nfs_attach_aio_context()
409 static void nfs_file_close(BlockDriverState *bs) in nfs_file_close() argument
411 NFSClient *client = bs->opaque; in nfs_file_close()
608 static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags, in nfs_file_open() argument
610 NFSClient *client = bs->opaque; in nfs_file_open()
613 client->aio_context = bdrv_get_aio_context(bs); in nfs_file_open()
617 bs->open_flags, errp); in nfs_file_open()
622 bs->total_sectors = ret; in nfs_file_open()
624 bs->supported_truncate_flags = BDRV_REQ_ZERO_WRITE; in nfs_file_open()
706 static int nfs_has_zero_init(BlockDriverState *bs) in nfs_has_zero_init() argument
708 NFSClient *client = bs->opaque; in nfs_has_zero_init()
730 static int64_t coroutine_fn nfs_co_get_allocated_file_size(BlockDriverState *bs) in nfs_co_get_allocated_file_size() argument
732 NFSClient *client = bs->opaque; in nfs_co_get_allocated_file_size()
736 if (bdrv_is_read_only(bs) && in nfs_co_get_allocated_file_size()
737 !(bs->open_flags & BDRV_O_NOCACHE)) { in nfs_co_get_allocated_file_size()
741 nfs_co_init_task(bs, &task); in nfs_co_get_allocated_file_size()
760 nfs_file_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, in nfs_file_co_truncate() argument
764 NFSClient *client = bs->opaque; in nfs_file_co_truncate()
787 NFSClient *client = state->bs->opaque; in nfs_reopen_prepare()
795 if (state->flags & BDRV_O_RDWR && bdrv_is_read_only(state->bs)) { in nfs_reopen_prepare()
822 static void nfs_refresh_filename(BlockDriverState *bs) in nfs_refresh_filename() argument
824 NFSClient *client = bs->opaque; in nfs_refresh_filename()
827 snprintf(bs->exact_filename, sizeof(bs->exact_filename), in nfs_refresh_filename()
831 snprintf(bs->exact_filename, sizeof(bs->exact_filename), in nfs_refresh_filename()
835 snprintf(bs->exact_filename, sizeof(bs->exact_filename), in nfs_refresh_filename()
839 snprintf(bs->exact_filename, sizeof(bs->exact_filename), in nfs_refresh_filename()
844 static char * GRAPH_RDLOCK nfs_dirname(BlockDriverState *bs, Error **errp) in nfs_dirname() argument
846 NFSClient *client = bs->opaque; in nfs_dirname()
849 bdrv_refresh_filename(bs); in nfs_dirname()
851 bs->filename); in nfs_dirname()
859 static void coroutine_fn nfs_co_invalidate_cache(BlockDriverState *bs, in nfs_co_invalidate_cache() argument
862 NFSClient *client = bs->opaque; in nfs_co_invalidate_cache()