diff --git a/CHANGELOG.md b/CHANGELOG.md index 388fbdfa9f..a8263e773a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/examples/blob/cli/blobcli.c b/examples/blob/cli/blobcli.c index 631793cdba..4468541891 100644 --- a/examples/blob/cli/blobcli.c +++ b/examples/blob/cli/blobcli.c @@ -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); } /* diff --git a/include/spdk/blob.h b/include/spdk/blob.h index d118075627..2d1e937666 100644 --- a/include/spdk/blob.h +++ b/include/spdk/blob.h @@ -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, diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 4ae3182297..9415891fe5 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -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 diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index d02c1d0702..a4eed47f17 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -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 diff --git a/lib/lvol/lvol.c b/lib/lvol/lvol.c index 090a25e20c..17a58ef1cc 100644 --- a/lib/lvol/lvol.c +++ b/lib/lvol/lvol.c @@ -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; diff --git a/test/unit/lib/blob/blob.c/blob_ut.c b/test/unit/lib/blob/blob.c/blob_ut.c index 8cd6c044f5..4f62a7b3e2 100644 --- a/test/unit/lib/blob/blob.c/blob_ut.c +++ b/test/unit/lib/blob/blob.c/blob_ut.c @@ -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); diff --git a/test/unit/lib/lvol/lvol.c/lvol_ut.c b/test/unit/lib/lvol/lvol.c/lvol_ut.c index c12906711f..a792901fb8 100644 --- a/test/unit/lib/lvol/lvol.c/lvol_ut.c +++ b/test/unit/lib/lvol/lvol.c/lvol_ut.c @@ -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) {