Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 : : */ 4 : : 5 : : #include "spdk/stdinc.h" 6 : : 7 : : #include "spdk/fsdev.h" 8 : : #include "spdk/env.h" 9 : : #include "spdk/thread.h" 10 : : 11 : : #include "spdk_internal/init.h" 12 : : #include "spdk/env.h" 13 : : 14 : : static void 15 : 567 : fsdev_initialize_complete(void *cb_arg, int rc) 16 : : { 17 : 567 : spdk_subsystem_init_next(rc); 18 : 567 : } 19 : : 20 : : static void 21 : 567 : fsdev_subsystem_initialize(void) 22 : : { 23 : 567 : spdk_fsdev_initialize(fsdev_initialize_complete, NULL); 24 : 567 : } 25 : : 26 : : static void 27 : 567 : fsdev_subsystem_finish_done(void *cb_arg) 28 : : { 29 : 567 : spdk_subsystem_fini_next(); 30 : 567 : } 31 : : 32 : : static void 33 : 567 : fsdev_subsystem_finish(void) 34 : : { 35 : 567 : spdk_fsdev_finish(fsdev_subsystem_finish_done, NULL); 36 : 567 : } 37 : : 38 : : static void 39 : 101 : fsdev_subsystem_config_json(struct spdk_json_write_ctx *w) 40 : : { 41 : 101 : spdk_fsdev_subsystem_config_json(w); 42 : 101 : } 43 : : 44 : : static struct spdk_subsystem g_spdk_subsystem_fsdev = { 45 : : .name = "fsdev", 46 : : .init = fsdev_subsystem_initialize, 47 : : .fini = fsdev_subsystem_finish, 48 : : .write_config_json = fsdev_subsystem_config_json, 49 : : }; 50 : : 51 : 649 : SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_fsdev);