The fs_send_request_fn() define the method to send requests for the blobfs which provide
by user, you can refer the __send_request() in
env_spdk.cc, this is defined for spdk works with rocksdb, we allocate an event on
particular core and then send to the reactor, the reactor will
handle the request next cpu cycle. We need allocate the SPDK thread at the very beginning
of the application, just as the env_spdk.cc:
From: SPDK [mailto:firstname.lastname@example.org] On Behalf Of txcy uio
Sent: Friday, September 15, 2017 5:38 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] blobfs questions
sdk_fs_init()/ spdk_fs_load() also take a fs_send_request_fn as a second argument ? How is
this used and when do we need to allocate a separate spdk thread with a send_request fn?
On Tue, Sep 12, 2017 at 5:26 PM, Chang, Cunyin
For the spdk_fs_init()/spdk_fs_load():
We will use spdk_fs_init() as the first time to create a fs, it will trim all the device
and get it initialized. After you do some operation on the fs, for example create some
And then you will call spdk_fs_unload() to sync super block and used md and cluster bit
mask to disk, next time, when you want to use the fs again, you just need to call
spdk_fs_load(), which will help to load all the files you created last time.
Completion callbacks are used when your IO operation done and then it will trigger the
callback one by one.
We can “not” assume the blobfs is ready to be use once spdk_fs_load(0 returns
successfully, the function is asynchronous,
You can do the following work in the callback function.
For the spdk_fs_init() and _load() usage, please refer to the fuse.c or env_spdk.cc.
From: SPDK [mailto:email@example.com<mailto:firstname.lastname@example.org>] On
Behalf Of txcy uio
Sent: Wednesday, September 13, 2017 4:34 AM
To: Storage Performance Development Kit
Subject: [SPDK] blobfs questions
I haver been trying to write a sample app which make use of blobs fs apis. I have been
running into some issues with correctly using spdk_fs_init and spdk_fs_load?
Could someone answer the following ?
- When is the spdk_fs_init()/spdk_fs_load() used ?
- What are use of completion call back functions ?
- Is it safe to assume that blobfs is ready to be used once spdk_fs_load() returns
- spdk_fs_init() and _load() take a send_request_fn as an argument and the code sometimes
coredumps when this is NULL. How does someone use this ?
SPDK mailing list