blob: change spdk_bs_iter_next parameter to spdk_blob *
Similar to previous change, the ** paradigm is a bit problematic for asynchronous routines that could fail. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ife7748280482356c4c51a796817b71cd7bc7e479 Reviewed-on: https://review.gerrithub.io/391483 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
e734bb9f9f
commit
ae5a01dd9f
@ -59,6 +59,9 @@ spdk_bs_md_iter_next => spdk_bs_iter_next
|
||||
The function signature of spdk_blob_close has changed. It now takes a struct spdk_blob * argument
|
||||
rather than struct spdk_blob **.
|
||||
|
||||
The function signature of spdk_bs_iter_next has changed. It now takes a struct spdk_blob * argument
|
||||
rather than struct spdk_blob **.
|
||||
|
||||
## v17.10: Logical Volumes
|
||||
|
||||
### New dependencies
|
||||
|
@ -519,7 +519,7 @@ blob_iter_cb(void *arg1, struct spdk_blob *blob, int bserrno)
|
||||
show_blob(cli_context);
|
||||
}
|
||||
|
||||
spdk_bs_iter_next(cli_context->bs, &blob, blob_iter_cb, cli_context);
|
||||
spdk_bs_iter_next(cli_context->bs, blob, blob_iter_cb, cli_context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -269,7 +269,7 @@ void spdk_bs_io_write_zeroes_blob(struct spdk_blob *blob, struct spdk_io_channel
|
||||
/* Iterate through all blobs */
|
||||
void spdk_bs_iter_first(struct spdk_blob_store *bs,
|
||||
spdk_blob_op_with_handle_complete cb_fn, void *cb_arg);
|
||||
void spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob **blob,
|
||||
void spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob *blob,
|
||||
spdk_blob_op_with_handle_complete cb_fn, void *cb_arg);
|
||||
|
||||
int spdk_blob_set_xattr(struct spdk_blob *blob, const char *name, const void *value,
|
||||
|
@ -2998,14 +2998,14 @@ _spdk_bs_iter_close_cpl(void *cb_arg, int bserrno)
|
||||
}
|
||||
|
||||
void
|
||||
spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob **b,
|
||||
spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob *b,
|
||||
spdk_blob_op_with_handle_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
struct spdk_bs_iter_ctx *ctx;
|
||||
struct spdk_blob_data *blob;
|
||||
|
||||
assert(b != NULL);
|
||||
blob = __blob_to_data(*b);
|
||||
blob = __blob_to_data(b);
|
||||
assert(blob != NULL);
|
||||
|
||||
ctx = calloc(1, sizeof(*ctx));
|
||||
@ -3020,7 +3020,7 @@ spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob **b,
|
||||
ctx->cb_arg = cb_arg;
|
||||
|
||||
/* Close the existing blob */
|
||||
spdk_blob_close(*b, _spdk_bs_iter_close_cpl, ctx);
|
||||
spdk_blob_close(b, _spdk_bs_iter_close_cpl, ctx);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -626,7 +626,7 @@ iter_cb(void *ctx, struct spdk_blob *blob, int rc)
|
||||
TAILQ_INSERT_TAIL(&args->op.fs_load.deleted_files, deleted_file, tailq);
|
||||
}
|
||||
|
||||
spdk_bs_iter_next(fs->bs, &blob, iter_cb, req);
|
||||
spdk_bs_iter_next(fs->bs, blob, iter_cb, req);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -175,7 +175,7 @@ _spdk_load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
if (blob_id == lvs->super_blob_id) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "found superblob %"PRIu64"\n", (uint64_t)blob_id);
|
||||
spdk_bs_iter_next(bs, &blob, _spdk_load_next_lvol, req);
|
||||
spdk_bs_iter_next(bs, blob, _spdk_load_next_lvol, req);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ _spdk_load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "added lvol %s\n", lvol->old_name);
|
||||
|
||||
spdk_bs_iter_next(bs, &blob, _spdk_load_next_lvol, req);
|
||||
spdk_bs_iter_next(bs, blob, _spdk_load_next_lvol, req);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -847,7 +847,7 @@ blob_iter(void)
|
||||
blob = g_blob;
|
||||
CU_ASSERT(spdk_blob_get_id(blob) == blobid);
|
||||
|
||||
spdk_bs_iter_next(bs, &blob, blob_op_with_handle_complete, NULL);
|
||||
spdk_bs_iter_next(bs, blob, blob_op_with_handle_complete, NULL);
|
||||
CU_ASSERT(g_blob == NULL);
|
||||
CU_ASSERT(g_bserrno == -ENOENT);
|
||||
|
||||
|
@ -88,13 +88,13 @@ struct lvol_ut_bs_dev {
|
||||
};
|
||||
|
||||
void
|
||||
spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob **b,
|
||||
spdk_bs_iter_next(struct spdk_blob_store *bs, struct spdk_blob *b,
|
||||
spdk_blob_op_with_handle_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
struct spdk_blob *next;
|
||||
int _errno = 0;
|
||||
|
||||
next = TAILQ_NEXT(*b, link);
|
||||
next = TAILQ_NEXT(b, link);
|
||||
if (next == NULL) {
|
||||
_errno = -ENOENT;
|
||||
} else if (next->load_status != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user