Commit 9934e414 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

blobfs_bdev: use spdk_thread_send_msg() instead of spdk_event_call()



We want to call blobfs APIs from a thread context, so use
spdk_thread_send_msg() to send messages from the POSIX thread to the blobfs.
spdk_event_call() was used prior to the spdk_thread API being create, this
just hadn't been cleaned up until now.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I98f884534939a93f9a4cbbb2fe7c87f4f610dc9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23264


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarGangCao <gang.cao@intel.com>
parent 758225a3
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -98,9 +98,6 @@ DEPDIRS-blob_bdev := log thread bdev

# module/blobfs
DEPDIRS-blobfs_bdev := $(BDEV_DEPS_THREAD) blob_bdev blobfs
ifeq ($(CONFIG_FUSE),y)
DEPDIRS-blobfs_bdev += event
endif

# module/accel
DEPDIRS-accel_ioat := log ioat thread $(JSON_LIBS) accel
+1 −13
Original line number Diff line number Diff line
@@ -46,22 +46,10 @@ blobfs_fuse_free(struct spdk_blobfs_fuse *bfuse)
	free(bfuse);
}

static void
__call_fn(void *arg1, void *arg2)
{
	fs_request_fn fn;

	fn = (fs_request_fn)arg1;
	fn(arg2);
}

void
blobfs_fuse_send_request(fs_request_fn fn, void *arg)
{
	struct spdk_event *event;

	event = spdk_event_allocate(0, __call_fn, (void *)fn, arg);
	spdk_event_call(event);
	spdk_thread_send_msg(spdk_thread_get_app_thread(), fn, arg);
}

static int