The internal mempools were replaced with the newly added iobuf interface. To make sure we respect spdk_bdev_opts's (small|large)_buf_pool_size, we call spdk_iobuf_set_opts() from spdk_bdev_set_opts(). These two options are now deprecated and users should switch to spdk_iobuf_set_opts(). Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ib1424dc5446796230d103104e272100fac649b42 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15328 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright (C) 2016 Intel Corporation.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
#include "spdk/bdev.h"
|
|
#include "spdk/env.h"
|
|
#include "spdk/thread.h"
|
|
|
|
#include "spdk_internal/init.h"
|
|
#include "spdk/env.h"
|
|
|
|
static void
|
|
bdev_initialize_complete(void *cb_arg, int rc)
|
|
{
|
|
spdk_subsystem_init_next(rc);
|
|
}
|
|
|
|
static void
|
|
bdev_subsystem_initialize(void)
|
|
{
|
|
spdk_bdev_initialize(bdev_initialize_complete, NULL);
|
|
}
|
|
|
|
static void
|
|
bdev_subsystem_finish_done(void *cb_arg)
|
|
{
|
|
spdk_subsystem_fini_next();
|
|
}
|
|
|
|
static void
|
|
bdev_subsystem_finish(void)
|
|
{
|
|
spdk_bdev_finish(bdev_subsystem_finish_done, NULL);
|
|
}
|
|
|
|
static void
|
|
bdev_subsystem_config_json(struct spdk_json_write_ctx *w)
|
|
{
|
|
spdk_bdev_subsystem_config_json(w);
|
|
}
|
|
|
|
static struct spdk_subsystem g_spdk_subsystem_bdev = {
|
|
.name = "bdev",
|
|
.init = bdev_subsystem_initialize,
|
|
.fini = bdev_subsystem_finish,
|
|
.write_config_json = bdev_subsystem_config_json,
|
|
};
|
|
|
|
SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_bdev);
|
|
SPDK_SUBSYSTEM_DEPEND(bdev, accel)
|
|
SPDK_SUBSYSTEM_DEPEND(bdev, vmd)
|
|
SPDK_SUBSYSTEM_DEPEND(bdev, sock)
|
|
SPDK_SUBSYSTEM_DEPEND(bdev, iobuf)
|