blob: Remove per-channel queue size configuration
This will need to be configured globally for all channels. Change-Id: I773252f220373617f8d09d1f24243db8095cf8a4 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
69d3eba0f3
commit
bea2e2308f
@ -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);
|
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,
|
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);
|
void spdk_bs_free_io_channel(struct spdk_io_channel *channel);
|
||||||
|
|
||||||
|
|||||||
@ -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_blob_store *bs = io_device;
|
||||||
struct spdk_bs_dev *dev = bs->dev;
|
struct spdk_bs_dev *dev = bs->dev;
|
||||||
struct spdk_bs_channel *channel = ctx_buf;
|
struct spdk_bs_channel *channel = ctx_buf;
|
||||||
uint32_t max_ops = *(uint32_t *)unique_ctx;
|
|
||||||
uint32_t i;
|
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) {
|
if (!channel->req_mem) {
|
||||||
free(channel);
|
free(channel);
|
||||||
return -1;
|
return -1;
|
||||||
@ -1066,7 +1065,7 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void
|
|||||||
|
|
||||||
TAILQ_INIT(&channel->reqs);
|
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);
|
TAILQ_INSERT_TAIL(&channel->reqs, &channel->req_mem[i], link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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)
|
int spdk_bs_register_md_thread(struct spdk_blob_store *bs)
|
||||||
{
|
{
|
||||||
bs->md_channel = spdk_get_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, true,
|
bs->md_channel = spdk_get_io_channel(bs, SPDK_IO_PRIORITY_DEFAULT, true,
|
||||||
(void *)&bs->max_md_ops);
|
NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2075,9 +2074,9 @@ void spdk_bs_md_close_blob(struct spdk_blob **b,
|
|||||||
/* END spdk_bs_md_close_blob */
|
/* END spdk_bs_md_close_blob */
|
||||||
|
|
||||||
struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs,
|
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)
|
void spdk_bs_free_io_channel(struct spdk_io_channel *channel)
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define SPDK_BLOB_OPTS_CLUSTER_SZ (1024 * 1024)
|
#define SPDK_BLOB_OPTS_CLUSTER_SZ (1024 * 1024)
|
||||||
#define SPDK_BLOB_OPTS_NUM_MD_PAGES UINT32_MAX
|
#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 {
|
struct spdk_xattr {
|
||||||
/* TODO: reorder for best packing */
|
/* TODO: reorder for best packing */
|
||||||
|
|||||||
@ -283,9 +283,9 @@ common_fs_bs_init(struct spdk_filesystem *fs, struct spdk_blob_store *bs)
|
|||||||
{
|
{
|
||||||
fs->bs = bs;
|
fs->bs = bs;
|
||||||
fs->bs_opts.cluster_sz = spdk_bs_get_cluster_size(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->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;
|
fs->sync_fs_channel->send_request = __send_request_direct;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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);
|
io_channel = spdk_get_io_channel(fs, priority, true, (void *)&max_ops);
|
||||||
fs_channel = spdk_io_channel_get_ctx(io_channel);
|
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;
|
fs_channel->send_request = __send_request_direct;
|
||||||
|
|
||||||
return io_channel;
|
return io_channel;
|
||||||
|
|||||||
@ -309,7 +309,7 @@ channel_ops(void)
|
|||||||
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
||||||
bs = g_bs;
|
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);
|
CU_ASSERT(channel != NULL);
|
||||||
|
|
||||||
spdk_bs_free_io_channel(channel);
|
spdk_bs_free_io_channel(channel);
|
||||||
@ -340,7 +340,7 @@ blob_write(void)
|
|||||||
|
|
||||||
pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs);
|
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);
|
CU_ASSERT(channel != NULL);
|
||||||
|
|
||||||
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
||||||
@ -406,7 +406,7 @@ blob_read(void)
|
|||||||
|
|
||||||
pages_per_cluster = spdk_bs_get_cluster_size(bs) / spdk_bs_get_page_size(bs);
|
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);
|
CU_ASSERT(channel != NULL);
|
||||||
|
|
||||||
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
||||||
@ -470,7 +470,7 @@ blob_rw_verify(void)
|
|||||||
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
||||||
bs = g_bs;
|
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);
|
CU_ASSERT(channel != NULL);
|
||||||
|
|
||||||
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
spdk_bs_md_create_blob(bs, blob_op_with_id_complete, NULL);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user