Commit 2b435d1a authored by Evgeniy Kochetov's avatar Evgeniy Kochetov Committed by Jim Harris
Browse files

event/fsdev: Add fsdev subsystem



Change-Id: Ib8badf7fdc7be88751f7acc41574f37e30922e36
Signed-off-by: default avatarEvgeniy Kochetov <evgeniik@nvidia.com>
Signed-off-by: default avatarAnton Nayshtut <anayshtut@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22532


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent bf30e09a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ DEPDIRS-event_sock := init sock log
DEPDIRS-event_vfu_tgt := init vfu_tgt
DEPDIRS-event_iobuf := init log thread util $(JSON_LIBS)
DEPDIRS-event_keyring := init json keyring
DEPDIRS-event_fsdev := init fsdev

# module/vfu_device

+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ endif

DIRS-$(CONFIG_VHOST) += vhost_blk vhost_scsi
DIRS-$(CONFIG_VFIO_USER) += vfu_tgt
DIRS-$(CONFIG_FSDEV) += fsdev

# These dependencies are not based specifically on symbols, but rather
# the subsystem dependency tree defined within the event subsystem C files
+16 −0
Original line number Diff line number Diff line
#  SPDX-License-Identifier: BSD-3-Clause
#  Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 1
SO_MINOR := 0

C_SRCS = fsdev.c
LIBNAME = event_fsdev

SPDK_MAP_FILE = $(SPDK_ROOT_DIR)/mk/spdk_blank.map

include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk
+51 −0
Original line number Diff line number Diff line
/*   SPDX-License-Identifier: BSD-3-Clause
 *   Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 */

#include "spdk/stdinc.h"

#include "spdk/fsdev.h"
#include "spdk/env.h"
#include "spdk/thread.h"

#include "spdk_internal/init.h"
#include "spdk/env.h"

static void
fsdev_initialize_complete(void *cb_arg, int rc)
{
	spdk_subsystem_init_next(rc);
}

static void
fsdev_subsystem_initialize(void)
{
	spdk_fsdev_initialize(fsdev_initialize_complete, NULL);
}

static void
fsdev_subsystem_finish_done(void *cb_arg)
{
	spdk_subsystem_fini_next();
}

static void
fsdev_subsystem_finish(void)
{
	spdk_fsdev_finish(fsdev_subsystem_finish_done, NULL);
}

static void
fsdev_subsystem_config_json(struct spdk_json_write_ctx *w)
{
	spdk_fsdev_subsystem_config_json(w);
}

static struct spdk_subsystem g_spdk_subsystem_fsdev = {
	.name = "fsdev",
	.init = fsdev_subsystem_initialize,
	.fini = fsdev_subsystem_finish,
	.write_config_json = fsdev_subsystem_config_json,
};

SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_fsdev);