Lines Matching refs:target

52 	struct io_target *target;  member
88 struct io_target *target = arg; in __get_io_channel() local
90 target->ch = spdk_bdev_get_io_channel(target->bdev_desc); in __get_io_channel()
91 assert(target->ch); in __get_io_channel()
104 struct io_target *target; in bdevio_construct_target_by_name() local
110 target = malloc(sizeof(struct io_target)); in bdevio_construct_target_by_name()
111 if (target == NULL) { in bdevio_construct_target_by_name()
116 &target->bdev_desc); in bdevio_construct_target_by_name()
118 free(target); in bdevio_construct_target_by_name()
123 bdev = spdk_bdev_desc_get_bdev(target->bdev_desc); in bdevio_construct_target_by_name()
132 target->bdev = bdev; in bdevio_construct_target_by_name()
133 target->next = g_io_targets; in bdevio_construct_target_by_name()
134 execute_spdk_function(__get_io_channel, target); in bdevio_construct_target_by_name()
135 g_io_targets = target; in bdevio_construct_target_by_name()
172 struct io_target *target = arg; in __put_io_channel() local
174 spdk_put_io_channel(target->ch); in __put_io_channel()
181 struct io_target *target; in bdevio_cleanup_targets() local
183 target = g_io_targets; in bdevio_cleanup_targets()
184 while (target != NULL) { in bdevio_cleanup_targets()
185 execute_spdk_function(__put_io_channel, target); in bdevio_cleanup_targets()
186 spdk_bdev_close(target->bdev_desc); in bdevio_cleanup_targets()
187 g_io_targets = target->next; in bdevio_cleanup_targets()
188 free(target); in bdevio_cleanup_targets()
189 target = g_io_targets; in bdevio_cleanup_targets()
231 struct io_target *target = req->target; in __blockdev_write() local
235 rc = spdk_bdev_writev(target->bdev_desc, target->ch, req->iov, req->iovcnt, req->offset, in __blockdev_write()
238 rc = spdk_bdev_write(target->bdev_desc, target->ch, req->buf, req->offset, in __blockdev_write()
252 struct io_target *target = req->target; in __blockdev_write_zeroes() local
255 rc = spdk_bdev_write_zeroes(target->bdev_desc, target->ch, req->offset, in __blockdev_write_zeroes()
267 struct io_target *target = req->target; in __blockdev_compare_and_write() local
268 struct spdk_bdev *bdev = target->bdev; in __blockdev_compare_and_write()
271 rc = spdk_bdev_comparev_and_writev_blocks(target->bdev_desc, target->ch, req->iov, req->iovcnt, in __blockdev_compare_and_write()
334 blockdev_write(struct io_target *target, char *tx_buf, in blockdev_write() argument
339 req.target = target; in blockdev_write()
351 _blockdev_compare_and_write(struct io_target *target, char *cmp_buf, char *write_buf, in _blockdev_compare_and_write() argument
356 req.target = target; in _blockdev_compare_and_write()
370 blockdev_write_zeroes(struct io_target *target, char *tx_buf, in blockdev_write_zeroes() argument
375 req.target = target; in blockdev_write_zeroes()
389 struct io_target *target = req->target; in __blockdev_read() local
393 rc = spdk_bdev_readv(target->bdev_desc, target->ch, req->iov, req->iovcnt, req->offset, in __blockdev_read()
396 rc = spdk_bdev_read(target->bdev_desc, target->ch, req->buf, req->offset, in __blockdev_read()
407 blockdev_read(struct io_target *target, char *rx_buf, in blockdev_read() argument
412 req.target = target; in blockdev_read()
428 struct io_target *target = req->target; in _blockdev_copy() local
429 struct spdk_bdev *bdev = target->bdev; in _blockdev_copy()
432 rc = spdk_bdev_copy_blocks(target->bdev_desc, target->ch, in _blockdev_copy()
445 blockdev_copy(struct io_target *target, uint64_t dst_offset, uint64_t src_offset, int data_len) in blockdev_copy() argument
449 req.target = target; in blockdev_copy()
469 struct io_target *target; in blockdev_write_read() local
476 target = g_current_io_target; in blockdev_write_read()
478 if (spdk_bdev_get_write_unit_size(target->bdev) > 1 && expected_rc == 0) { in blockdev_write_read()
481 write_unit_bytes = spdk_bdev_get_write_unit_size(target->bdev) * in blockdev_write_read()
482 spdk_bdev_get_block_size(target->bdev); in blockdev_write_read()
495 blockdev_write(target, tx_buf, write_offset, write_data_len, iov_len); in blockdev_write_read()
500 blockdev_write_zeroes(target, tx_buf, write_offset, write_data_len); in blockdev_write_read()
509 blockdev_read(target, rx_buf, offset, data_length, iov_len); in blockdev_write_read()
531 struct io_target *target = g_current_io_target; in blockdev_compare_and_write() local
532 struct spdk_bdev *bdev = target->bdev; in blockdev_compare_and_write()
543 blockdev_write(target, tx_buf, offset, data_length, iov_len); in blockdev_compare_and_write()
546 _blockdev_compare_and_write(target, tx_buf, write_buf, offset, data_length, iov_len); in blockdev_compare_and_write()
549 _blockdev_compare_and_write(target, tx_buf, write_buf, offset, data_length, iov_len); in blockdev_compare_and_write()
552 blockdev_read(target, rx_buf, offset, data_length, iov_len); in blockdev_compare_and_write()
571 struct io_target *target = g_current_io_target; in blockdev_write_read_block() local
572 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_block()
594 struct io_target *target = g_current_io_target; in blockdev_write_zeroes_read_block() local
595 struct spdk_bdev *bdev = target->bdev; in blockdev_write_zeroes_read_block()
619 struct io_target *target = g_current_io_target; in blockdev_write_zeroes_read_no_split() local
620 struct spdk_bdev *bdev = target->bdev; in blockdev_write_zeroes_read_no_split()
646 struct io_target *target = g_current_io_target; in blockdev_write_zeroes_read_split() local
647 struct spdk_bdev *bdev = target->bdev; in blockdev_write_zeroes_read_split()
675 struct io_target *target = g_current_io_target; in blockdev_write_zeroes_read_split_partial() local
676 struct spdk_bdev *bdev = target->bdev; in blockdev_write_zeroes_read_split_partial()
698 struct io_target *target = g_current_io_target; in blockdev_writev_readv_block() local
699 struct spdk_bdev *bdev = target->bdev; in blockdev_writev_readv_block()
720 struct io_target *target = g_current_io_target; in blockdev_comparev_and_writev() local
721 struct spdk_bdev *bdev = target->bdev; in blockdev_comparev_and_writev()
749 struct io_target *target = g_current_io_target; in blockdev_writev_readv_30x1block() local
750 struct spdk_bdev *bdev = target->bdev; in blockdev_writev_readv_30x1block()
773 struct io_target *target = g_current_io_target; in blockdev_write_read_8blocks() local
774 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_8blocks()
796 struct io_target *target = g_current_io_target; in blockdev_writev_readv_8blocks() local
797 struct spdk_bdev *bdev = target->bdev; in blockdev_writev_readv_8blocks()
821 struct io_target *target = g_current_io_target; in blockdev_write_read_size_gt_128k() local
822 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_size_gt_128k()
846 struct io_target *target = g_current_io_target; in blockdev_writev_readv_size_gt_128k() local
847 struct spdk_bdev *bdev = target->bdev; in blockdev_writev_readv_size_gt_128k()
872 struct io_target *target = g_current_io_target; in blockdev_writev_readv_size_gt_128k_two_iov() local
873 struct spdk_bdev *bdev = target->bdev; in blockdev_writev_readv_size_gt_128k_two_iov()
898 struct io_target *target = g_current_io_target; in blockdev_write_read_invalid_size() local
899 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_invalid_size()
921 struct io_target *target = g_current_io_target; in blockdev_write_read_offset_plus_nbytes_equals_bdev_size() local
922 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_offset_plus_nbytes_equals_bdev_size()
946 struct io_target *target = g_current_io_target; in blockdev_write_read_offset_plus_nbytes_gt_bdev_size() local
947 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_offset_plus_nbytes_gt_bdev_size()
973 struct io_target *target = g_current_io_target; in blockdev_write_read_max_offset() local
974 struct spdk_bdev *bdev = target->bdev; in blockdev_write_read_max_offset()
997 struct io_target *target = g_current_io_target; in blockdev_overlapped_write_read_2blocks() local
998 struct spdk_bdev *bdev = target->bdev; in blockdev_overlapped_write_read_2blocks()
1029 struct io_target *target = req->target; in __blockdev_reset() local
1032 rc = spdk_bdev_reset(target->bdev_desc, target->ch, quick_test_complete, NULL); in __blockdev_reset()
1043 struct io_target *target; in blockdev_test_reset() local
1046 target = g_current_io_target; in blockdev_test_reset()
1047 req.target = target; in blockdev_test_reset()
1049 reset_supported = spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_RESET); in blockdev_test_reset()
1061 struct io_target *target; member
1081 struct io_target *target = pt_req->target; in __blockdev_nvme_passthru() local
1084 rc = spdk_bdev_nvme_io_passthru(target->bdev_desc, target->ch, in __blockdev_nvme_passthru()
1097 struct io_target *target; in blockdev_test_nvme_passthru_rw() local
1099 target = g_current_io_target; in blockdev_test_nvme_passthru_rw()
1101 if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_NVME_IO)) { in blockdev_test_nvme_passthru_rw()
1106 pt_req.target = target; in blockdev_test_nvme_passthru_rw()
1112 pt_req.len = spdk_bdev_get_block_size(target->bdev); in blockdev_test_nvme_passthru_rw()
1142 struct io_target *target; in blockdev_test_nvme_passthru_vendor_specific() local
1144 target = g_current_io_target; in blockdev_test_nvme_passthru_vendor_specific()
1146 if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_NVME_IO)) { in blockdev_test_nvme_passthru_vendor_specific()
1151 pt_req.target = target; in blockdev_test_nvme_passthru_vendor_specific()
1168 struct io_target *target = pt_req->target; in __blockdev_nvme_admin_passthru() local
1171 rc = spdk_bdev_nvme_admin_passthru(target->bdev_desc, target->ch, in __blockdev_nvme_admin_passthru()
1182 struct io_target *target; in blockdev_test_nvme_admin_passthru() local
1185 target = g_current_io_target; in blockdev_test_nvme_admin_passthru()
1187 if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_NVME_ADMIN)) { in blockdev_test_nvme_admin_passthru()
1192 pt_req.target = target; in blockdev_test_nvme_admin_passthru()
1212 struct io_target *target = g_current_io_target; in blockdev_test_copy() local
1213 struct spdk_bdev *bdev = target->bdev; in blockdev_test_copy()
1219 if (!spdk_bdev_io_type_supported(target->bdev, SPDK_BDEV_IO_TYPE_COPY)) { in blockdev_test_copy()
1231 blockdev_write(target, tx_buf, src_offset, data_length, data_length); in blockdev_test_copy()
1234 blockdev_copy(target, dst_offset, src_offset, data_length); in blockdev_test_copy()
1237 blockdev_read(target, rx_buf, dst_offset, data_length, data_length); in blockdev_test_copy()
1291 __setup_ut_on_single_target(struct io_target *target) in __setup_ut_on_single_target() argument
1297 snprintf(name, sizeof(name), "bdevio tests on: %s", spdk_bdev_get_name(target->bdev)); in __setup_ut_on_single_target()
1365 struct io_target *target; in __run_ut_thread() local
1374 target = g_io_targets; in __run_ut_thread()
1375 while (target != NULL) { in __run_ut_thread()
1376 rc = __setup_ut_on_single_target(target); in __run_ut_thread()
1382 target = target->next; in __run_ut_thread()