add zv2404fs.c and fio
This commit is contained in:
54
zv2404fs.c
Executable file
54
zv2404fs.c
Executable file
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <spdk/event.h>
|
||||
#include <spdk/blob.h>
|
||||
#include <spdk/bdev.h>
|
||||
#include <spdk/blob_bdev.h>
|
||||
|
||||
|
||||
void zv2404_spdk_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
|
||||
void *event_ctx) {
|
||||
|
||||
printf("zv2404_spdk_bdev_event_cb\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void zv2404fs_entry(void *ctx) {
|
||||
|
||||
|
||||
struct spdk_bs_dev *bs_dev = NULL;
|
||||
|
||||
int rc = spdk_bdev_create_bs_dev_ext("Malloc0", zv2404_spdk_bdev_event_cb, NULL, &bs_dev);
|
||||
if (rc != 0) {
|
||||
spdk_app_stop(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
printf("zv2404fs_entry\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
if (argc != 2) return -1;
|
||||
|
||||
struct spdk_app_opts opts = {};
|
||||
|
||||
spdk_app_opts_init(&opts, sizeof(opts));
|
||||
opts.name = "zv2404fs";
|
||||
opts.json_config_file = argv[1];
|
||||
|
||||
spdk_app_start(&opts, zv2404fs_entry, NULL);
|
||||
|
||||
printf("hello spdk\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user