Lines Matching defs:ctx
520 raid_bdev_destruct(void *ctx)
522 spdk_thread_exec_msg(spdk_thread_get_app_thread(), _raid_bdev_destruct, ctx);
1025 * ctx - pointer to raid bdev context
1032 raid_bdev_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
1042 return _raid_bdev_io_type_supported(ctx, io_type);
1122 * ctx - pointer to raid_bdev
1129 raid_bdev_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
1131 struct raid_bdev *raid_bdev = ctx;
1195 raid_bdev_get_memory_domains(void *ctx, struct spdk_memory_domain **domains, int array_size)
1197 struct raid_bdev *raid_bdev = ctx;
1658 _raid_bdev_unregistering_cont(void *ctx)
1660 struct raid_bdev *raid_bdev = ctx;
1667 raid_bdev_unregistering_cont(void *ctx)
1669 spdk_thread_exec_msg(spdk_thread_get_app_thread(), _raid_bdev_unregistering_cont, ctx);
1694 raid_bdev_unregistering_stop_process(void *ctx)
1696 struct raid_bdev_process *process = ctx;
1783 raid_bdev_configure_write_sb_cb(int status, struct raid_bdev *raid_bdev, void *ctx)
1953 raid_bdev_remove_base_bdev_on_unquiesced(void *ctx, int status)
1955 struct raid_base_bdev_info *base_info = ctx;
2010 raid_bdev_remove_base_bdev_write_sb_cb(int status, struct raid_bdev *raid_bdev, void *ctx)
2012 struct raid_base_bdev_info *base_info = ctx;
2025 raid_bdev_remove_base_bdev_on_quiesced(void *ctx, int status)
2027 struct raid_base_bdev_info *base_info = ctx;
2078 _raid_bdev_process_base_bdev_remove_cont(void *ctx)
2080 struct raid_base_bdev_info *base_info = ctx;
2092 struct raid_bdev_process_base_bdev_remove_ctx *ctx = _ctx;
2093 struct raid_base_bdev_info *base_info = ctx->base_info;
2095 free(ctx);
2104 struct raid_bdev_process_base_bdev_remove_ctx *ctx = _ctx;
2105 struct raid_bdev_process *process = ctx->process;
2108 if (ctx->base_info != process->target &&
2109 ctx->num_base_bdevs_operational > process->raid_bdev->min_base_bdevs_operational) {
2111 raid_bdev_process_base_bdev_remove_cont(ctx);
2118 ret = raid_bdev_process_add_finish_action(process, raid_bdev_process_base_bdev_remove_cont, ctx);
2120 raid_bdev_remove_base_bdev_done(ctx->base_info, ret);
2121 free(ctx);
2136 struct raid_bdev_process_base_bdev_remove_ctx *ctx;
2140 ctx = calloc(1, sizeof(*ctx));
2141 if (ctx == NULL) {
2146 * We have to send the process and num_base_bdevs_operational in the message ctx
2148 * raid_bdev->process may be cleared by the time the message is handled, but ctx->process
2151 ctx->base_info = base_info;
2152 ctx->process = process;
2159 ctx->num_base_bdevs_operational++;
2163 spdk_thread_send_msg(process->thread, _raid_bdev_process_base_bdev_remove, ctx);
2255 raid_bdev_fail_base_remove_cb(void *ctx, int status)
2257 struct raid_base_bdev_info *base_info = ctx;
2266 _raid_bdev_fail_base_bdev(void *ctx)
2268 struct raid_base_bdev_info *base_info = ctx;
2292 raid_bdev_resize_write_sb_cb(int status, struct raid_bdev *raid_bdev, void *ctx)
2448 raid_bdev_process_finish_write_sb_cb(int status, struct raid_bdev *raid_bdev, void *ctx)
2457 raid_bdev_process_finish_write_sb(void *ctx)
2459 struct raid_bdev *raid_bdev = ctx;
2485 _raid_bdev_process_finish_done(void *ctx)
2487 struct raid_bdev_process *process = ctx;
2504 raid_bdev_process_finish_target_removed(void *ctx, int status)
2506 struct raid_bdev_process *process = ctx;
2516 raid_bdev_process_finish_unquiesced(void *ctx, int status)
2518 struct raid_bdev_process *process = ctx;
2537 raid_bdev_process_finish_unquiesce(void *ctx)
2539 struct raid_bdev_process *process = ctx;
2550 raid_bdev_process_finish_done(void *ctx)
2552 struct raid_bdev_process *process = ctx;
2609 raid_bdev_process_finish_quiesced(void *ctx, int status)
2611 struct raid_bdev_process *process = ctx;
2627 _raid_bdev_process_finish(void *ctx)
2629 struct raid_bdev_process *process = ctx;
2635 raid_bdev_process_finish_quiesced(ctx, rc);
2672 raid_bdev_process_window_range_unlocked(void *ctx, int status)
2674 struct raid_bdev_process *process = ctx;
2811 raid_bdev_process_window_range_locked(void *ctx, int status)
2813 struct raid_bdev_process *process = ctx;
2911 raid_bdev_process_thread_init(void *ctx)
2913 struct raid_bdev_process *process = ctx;
3217 void *ctx)
3219 struct raid_base_bdev_info *base_info = ctx;
3579 struct raid_bdev_examine_others_ctx *ctx = _ctx;
3581 if (ctx->cb_fn != NULL) {
3582 ctx->cb_fn(ctx->cb_ctx, status);
3584 free(ctx);
3588 const struct raid_bdev_superblock *sb, int status, void *ctx);
3599 struct raid_bdev_examine_others_ctx *ctx = _ctx;
3602 raid_bdev_examine_others_done(ctx, status);
3606 raid_bdev_examine_sb(sb, bdev, raid_bdev_examine_others, ctx);
3612 struct raid_bdev_examine_others_ctx *ctx = _ctx;
3621 raid_bdev = raid_bdev_find_by_uuid(&ctx->raid_bdev_uuid);
3627 for (base_info = &raid_bdev->base_bdev_info[ctx->current_base_bdev_idx];
3640 ctx->current_base_bdev_idx = raid_bdev_base_bdev_slot(base_info);
3642 status = raid_bdev_examine_load_sb(uuid_str, raid_bdev_examine_others_load_cb, ctx);
3649 raid_bdev_examine_others_done(ctx, status);
3725 struct raid_bdev_examine_others_ctx *ctx;
3727 ctx = calloc(1, sizeof(*ctx));
3728 if (ctx == NULL) {
3737 free(ctx);
3742 spdk_uuid_copy(&ctx->raid_bdev_uuid, &sb->uuid);
3743 ctx->cb_fn = cb_fn;
3744 ctx->cb_ctx = cb_ctx;
3747 cb_ctx = ctx;
3813 raid_bdev_examine_ctx_free(struct raid_bdev_examine_ctx *ctx)
3815 if (!ctx) {
3819 if (ctx->ch) {
3820 spdk_put_io_channel(ctx->ch);
3823 if (ctx->desc) {
3824 spdk_bdev_close(ctx->desc);
3827 free(ctx);
3833 struct raid_bdev_examine_ctx *ctx = _ctx;
3834 struct spdk_bdev *bdev = spdk_bdev_desc_get_bdev(ctx->desc);
3836 ctx->cb(bdev, sb, status, ctx->cb_ctx);
3838 raid_bdev_examine_ctx_free(ctx);
3849 struct raid_bdev_examine_ctx *ctx;
3854 ctx = calloc(1, sizeof(*ctx));
3855 if (!ctx) {
3859 rc = spdk_bdev_open_ext(bdev_name, false, raid_bdev_examine_event_cb, NULL, &ctx->desc);
3865 ctx->ch = spdk_bdev_get_io_channel(ctx->desc);
3866 if (!ctx->ch) {
3872 ctx->cb = cb;
3873 ctx->cb_ctx = cb_ctx;
3875 rc = raid_bdev_load_base_bdev_superblock(ctx->desc, ctx->ch, raid_bdev_examine_load_sb_done, ctx);
3884 raid_bdev_examine_ctx_free(ctx);
3889 raid_bdev_examine_done(void *ctx, int status)
3891 struct spdk_bdev *bdev = ctx;
3902 void *ctx)
3964 {{ "ctx", SPDK_TRACE_ARG_TYPE_PTR, 8 }}
3969 {{ "ctx", SPDK_TRACE_ARG_TYPE_PTR, 8 }}