Lines Matching refs:bs

604 iscsi_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors,  in iscsi_co_writev()  argument
607 IscsiLun *iscsilun = bs->opaque; in iscsi_co_writev()
621 if (bs->bl.max_transfer) { in iscsi_co_writev()
622 assert(nb_sectors << BDRV_SECTOR_BITS <= bs->bl.max_transfer); in iscsi_co_writev()
696 static int coroutine_fn iscsi_co_block_status(BlockDriverState *bs, in iscsi_co_block_status() argument
702 IscsiLun *iscsilun = bs->opaque; in iscsi_co_block_status()
794 *file = bs; in iscsi_co_block_status()
799 static int coroutine_fn iscsi_co_readv(BlockDriverState *bs, in iscsi_co_readv() argument
803 IscsiLun *iscsilun = bs->opaque; in iscsi_co_readv()
813 if (bs->bl.max_transfer) { in iscsi_co_readv()
814 assert(nb_sectors << BDRV_SECTOR_BITS <= bs->bl.max_transfer); in iscsi_co_readv()
841 ret = iscsi_co_block_status(bs, true, in iscsi_co_readv()
920 static int coroutine_fn iscsi_co_flush(BlockDriverState *bs) in iscsi_co_flush() argument
922 IscsiLun *iscsilun = bs->opaque; in iscsi_co_flush()
1011 BlockDriverState *bs = acb->common.bs; in iscsi_ioctl_handle_emulated() local
1012 IscsiLun *iscsilun = bs->opaque; in iscsi_ioctl_handle_emulated()
1026 acb->bh = aio_bh_new(bdrv_get_aio_context(bs), in iscsi_ioctl_handle_emulated()
1032 static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, in iscsi_aio_ioctl() argument
1036 IscsiLun *iscsilun = bs->opaque; in iscsi_aio_ioctl()
1041 acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque); in iscsi_aio_ioctl()
1132 iscsi_co_getlength(BlockDriverState *bs) in iscsi_co_getlength() argument
1134 IscsiLun *iscsilun = bs->opaque; in iscsi_co_getlength()
1144 coroutine_fn iscsi_co_pdiscard(BlockDriverState *bs, int64_t offset, in iscsi_co_pdiscard() argument
1147 IscsiLun *iscsilun = bs->opaque; in iscsi_co_pdiscard()
1214 coroutine_fn iscsi_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, in iscsi_co_pwrite_zeroes() argument
1217 IscsiLun *iscsilun = bs->opaque; in iscsi_co_pwrite_zeroes()
1538 static void iscsi_detach_aio_context(BlockDriverState *bs) in iscsi_detach_aio_context() argument
1540 IscsiLun *iscsilun = bs->opaque; in iscsi_detach_aio_context()
1556 static void iscsi_attach_aio_context(BlockDriverState *bs, in iscsi_attach_aio_context() argument
1559 IscsiLun *iscsilun = bs->opaque; in iscsi_attach_aio_context()
1795 static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, in iscsi_open() argument
1798 IscsiLun *iscsilun = bs->opaque; in iscsi_open()
1906 iscsilun->aio_context = bdrv_get_aio_context(bs); in iscsi_open()
1922 bs->supported_write_flags = BDRV_REQ_FUA; in iscsi_open()
1929 ret = bdrv_apply_auto_read_only(bs, "LUN is write protected", errp); in iscsi_open()
1943 bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun); in iscsi_open()
1950 bs->sg = true; in iscsi_open()
2009 iscsi_attach_aio_context(bs, iscsilun->aio_context); in iscsi_open()
2024 bs->supported_zero_flags = BDRV_REQ_MAY_UNMAP; in iscsi_open()
2047 static void iscsi_close(BlockDriverState *bs) in iscsi_close() argument
2049 IscsiLun *iscsilun = bs->opaque; in iscsi_close()
2052 iscsi_detach_aio_context(bs); in iscsi_close()
2067 static void iscsi_refresh_limits(BlockDriverState *bs, Error **errp) in iscsi_refresh_limits() argument
2072 IscsiLun *iscsilun = bs->opaque; in iscsi_refresh_limits()
2076 assert(iscsilun->block_size >= BDRV_SECTOR_SIZE || bdrv_is_sg(bs)); in iscsi_refresh_limits()
2078 bs->bl.request_alignment = block_size; in iscsi_refresh_limits()
2085 bs->bl.max_transfer = max_xfer_len * iscsilun->block_size; in iscsi_refresh_limits()
2089 bs->bl.max_pdiscard = in iscsi_refresh_limits()
2092 bs->bl.pdiscard_alignment = in iscsi_refresh_limits()
2095 bs->bl.pdiscard_alignment = iscsilun->block_size; in iscsi_refresh_limits()
2098 bs->bl.max_pwrite_zeroes = in iscsi_refresh_limits()
2103 bs->bl.pwrite_zeroes_alignment = in iscsi_refresh_limits()
2106 bs->bl.pwrite_zeroes_alignment = iscsilun->block_size; in iscsi_refresh_limits()
2110 bs->bl.opt_transfer = pow2floor(iscsilun->bl.opt_xfer_len * in iscsi_refresh_limits()
2120 IscsiLun *iscsilun = state->bs->opaque; in iscsi_reopen_prepare()
2131 IscsiLun *iscsilun = reopen_state->bs->opaque; in iscsi_reopen_commit()
2139 static int coroutine_fn iscsi_co_truncate(BlockDriverState *bs, int64_t offset, in iscsi_co_truncate() argument
2143 IscsiLun *iscsilun = bs->opaque; in iscsi_co_truncate()
2164 cur_length = iscsi_co_getlength(bs); in iscsi_co_truncate()
2174 iscsi_allocmap_init(iscsilun, bs->open_flags); in iscsi_co_truncate()
2181 iscsi_co_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) in iscsi_co_get_info() argument
2183 IscsiLun *iscsilun = bs->opaque; in iscsi_co_get_info()
2188 static void coroutine_fn iscsi_co_invalidate_cache(BlockDriverState *bs, in iscsi_co_invalidate_cache() argument
2191 IscsiLun *iscsilun = bs->opaque; in iscsi_co_invalidate_cache()
2196 iscsi_co_copy_range_from(BlockDriverState *bs, in iscsi_co_copy_range_from() argument
2335 iscsi_co_copy_range_to(BlockDriverState *bs, in iscsi_co_copy_range_to() argument
2341 IscsiLun *dst_lun = dst->bs->opaque; in iscsi_co_copy_range_to()
2348 if (src->bs->drv->bdrv_co_copy_range_to != iscsi_co_copy_range_to) { in iscsi_co_copy_range_to()
2351 src_lun = src->bs->opaque; in iscsi_co_copy_range_to()