Loading include/spdk/blob.h +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ void spdk_bs_md_sync_blob(struct spdk_blob *blob, void spdk_bs_md_close_blob(struct spdk_blob **blob, spdk_blob_op_complete cb_fn, void *cb_arg); struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs, uint32_t priority, uint32_t max_ops); uint32_t priority); void spdk_bs_free_io_channel(struct spdk_io_channel *channel); Loading lib/blob/blobstore.c +5 −6 Original line number Diff line number Diff line Loading @@ -1055,10 +1055,9 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void struct spdk_blob_store *bs = io_device; struct spdk_bs_dev *dev = bs->dev; struct spdk_bs_channel *channel = ctx_buf; uint32_t max_ops = *(uint32_t *)unique_ctx; uint32_t i; channel->req_mem = calloc(max_ops, sizeof(struct spdk_bs_request_set)); channel->req_mem = calloc(bs->max_md_ops, sizeof(struct spdk_bs_request_set)); if (!channel->req_mem) { free(channel); return -1; Loading @@ -1066,7 +1065,7 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void TAILQ_INIT(&channel->reqs); for (i = 0; i < max_ops; i++) { for (i = 0; i < bs->max_md_ops; i++) { TAILQ_INSERT_TAIL(&channel->reqs, &channel->req_mem[i], link); } Loading Loading @@ -1734,7 +1733,7 @@ spdk_bs_free_cluster_count(struct spdk_blob_store *bs) int spdk_bs_register_md_thread(struct spdk_blob_store *bs) { bs->md_channel = spdk_get_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, true, (void *)&bs->max_md_ops); NULL); return 0; } Loading Loading @@ -2075,9 +2074,9 @@ void spdk_bs_md_close_blob(struct spdk_blob **b, /* END spdk_bs_md_close_blob */ struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs, uint32_t priority, uint32_t max_ops) uint32_t priority) { return spdk_get_io_channel(bs, priority, true, (void *)&max_ops); return spdk_get_io_channel(bs, priority, true, NULL); } void spdk_bs_free_io_channel(struct spdk_io_channel *channel) Loading lib/blob/blobstore.h +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ #define SPDK_BLOB_OPTS_CLUSTER_SZ (1024 * 1024) #define SPDK_BLOB_OPTS_NUM_MD_PAGES UINT32_MAX #define SPDK_BLOB_OPTS_MAX_MD_OPS 32 #define SPDK_BLOB_OPTS_MAX_MD_OPS 512 struct spdk_xattr { /* TODO: reorder for best packing */ Loading lib/blobfs/blobfs.c +3 −3 Original line number Diff line number Diff line Loading @@ -283,9 +283,9 @@ common_fs_bs_init(struct spdk_filesystem *fs, struct spdk_blob_store *bs) { fs->bs = bs; fs->bs_opts.cluster_sz = spdk_bs_get_cluster_size(bs); fs->md_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs->md_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs->md_fs_channel->send_request = __send_request_direct; fs->sync_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs->sync_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs->sync_fs_channel->send_request = __send_request_direct; } Loading Loading @@ -1368,7 +1368,7 @@ spdk_fs_alloc_io_channel(struct spdk_filesystem *fs, uint32_t priority) io_channel = spdk_get_io_channel(fs, priority, true, (void *)&max_ops); fs_channel = spdk_io_channel_get_ctx(io_channel); fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs_channel->send_request = __send_request_direct; return io_channel; Loading test/lib/blob/blob_ut/blob_ut.c +4 −4 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ channel_ops(void) SPDK_CU_ASSERT_FATAL(g_bs != NULL); bs = g_bs; channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_free_io_channel(channel); Loading Loading @@ -340,7 +340,7 @@ blob_write(void) pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading Loading @@ -406,7 +406,7 @@ blob_read(void) pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading Loading @@ -470,7 +470,7 @@ blob_rw_verify(void) SPDK_CU_ASSERT_FATAL(g_bs != NULL); bs = g_bs; channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading Loading
include/spdk/blob.h +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ void spdk_bs_md_sync_blob(struct spdk_blob *blob, void spdk_bs_md_close_blob(struct spdk_blob **blob, spdk_blob_op_complete cb_fn, void *cb_arg); struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs, uint32_t priority, uint32_t max_ops); uint32_t priority); void spdk_bs_free_io_channel(struct spdk_io_channel *channel); Loading
lib/blob/blobstore.c +5 −6 Original line number Diff line number Diff line Loading @@ -1055,10 +1055,9 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void struct spdk_blob_store *bs = io_device; struct spdk_bs_dev *dev = bs->dev; struct spdk_bs_channel *channel = ctx_buf; uint32_t max_ops = *(uint32_t *)unique_ctx; uint32_t i; channel->req_mem = calloc(max_ops, sizeof(struct spdk_bs_request_set)); channel->req_mem = calloc(bs->max_md_ops, sizeof(struct spdk_bs_request_set)); if (!channel->req_mem) { free(channel); return -1; Loading @@ -1066,7 +1065,7 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void TAILQ_INIT(&channel->reqs); for (i = 0; i < max_ops; i++) { for (i = 0; i < bs->max_md_ops; i++) { TAILQ_INSERT_TAIL(&channel->reqs, &channel->req_mem[i], link); } Loading Loading @@ -1734,7 +1733,7 @@ spdk_bs_free_cluster_count(struct spdk_blob_store *bs) int spdk_bs_register_md_thread(struct spdk_blob_store *bs) { bs->md_channel = spdk_get_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, true, (void *)&bs->max_md_ops); NULL); return 0; } Loading Loading @@ -2075,9 +2074,9 @@ void spdk_bs_md_close_blob(struct spdk_blob **b, /* END spdk_bs_md_close_blob */ struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs, uint32_t priority, uint32_t max_ops) uint32_t priority) { return spdk_get_io_channel(bs, priority, true, (void *)&max_ops); return spdk_get_io_channel(bs, priority, true, NULL); } void spdk_bs_free_io_channel(struct spdk_io_channel *channel) Loading
lib/blob/blobstore.h +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ #define SPDK_BLOB_OPTS_CLUSTER_SZ (1024 * 1024) #define SPDK_BLOB_OPTS_NUM_MD_PAGES UINT32_MAX #define SPDK_BLOB_OPTS_MAX_MD_OPS 32 #define SPDK_BLOB_OPTS_MAX_MD_OPS 512 struct spdk_xattr { /* TODO: reorder for best packing */ Loading
lib/blobfs/blobfs.c +3 −3 Original line number Diff line number Diff line Loading @@ -283,9 +283,9 @@ common_fs_bs_init(struct spdk_filesystem *fs, struct spdk_blob_store *bs) { fs->bs = bs; fs->bs_opts.cluster_sz = spdk_bs_get_cluster_size(bs); fs->md_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs->md_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs->md_fs_channel->send_request = __send_request_direct; fs->sync_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs->sync_fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs->sync_fs_channel->send_request = __send_request_direct; } Loading Loading @@ -1368,7 +1368,7 @@ spdk_fs_alloc_io_channel(struct spdk_filesystem *fs, uint32_t priority) io_channel = spdk_get_io_channel(fs, priority, true, (void *)&max_ops); fs_channel = spdk_io_channel_get_ctx(io_channel); fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT, 512); fs_channel->bs_channel = spdk_bs_alloc_io_channel(fs->bs, SPDK_IO_PRIORITY_DEFAULT); fs_channel->send_request = __send_request_direct; return io_channel; Loading
test/lib/blob/blob_ut/blob_ut.c +4 −4 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ channel_ops(void) SPDK_CU_ASSERT_FATAL(g_bs != NULL); bs = g_bs; channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_free_io_channel(channel); Loading Loading @@ -340,7 +340,7 @@ blob_write(void) pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading Loading @@ -406,7 +406,7 @@ blob_read(void) pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading Loading @@ -470,7 +470,7 @@ blob_rw_verify(void) SPDK_CU_ASSERT_FATAL(g_bs != NULL); bs = g_bs; channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, 32); channel = spdk_bs_alloc_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT); CU_ASSERT(channel != NULL); spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL); Loading