xref: /spdk/module/fsdev/aio/fsdev_aio.h (revision 83ba9086796471697a4975a58f60e2392bccd08c)
1 /*   SPDX-License-Identifier: BSD-3-Clause
2  *   Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  */
4 
5 /** \file
6  * Operations on aio filesystem device
7  */
8 
9 #ifndef SPDK_FSDEV_AIO_H
10 #define SPDK_FSDEV_AIO_H
11 
12 #include "spdk/stdinc.h"
13 #include "spdk/fsdev_module.h"
14 
15 struct spdk_fsdev_aio_opts {
16 	bool xattr_enabled;
17 	bool writeback_cache_enabled;
18 	uint32_t max_write;
19 	bool skip_rw;
20 };
21 
22 typedef void (*spdk_delete_aio_fsdev_complete)(void *cb_arg, int fsdeverrno);
23 
24 void spdk_fsdev_aio_get_default_opts(struct spdk_fsdev_aio_opts *opts);
25 
26 int spdk_fsdev_aio_create(struct spdk_fsdev **fsdev, const char *name, const char *root_path,
27 			  const struct spdk_fsdev_aio_opts *opts);
28 void spdk_fsdev_aio_delete(const char *name, spdk_delete_aio_fsdev_complete cb_fn, void *cb_arg);
29 
30 #endif /* SPDK_FSDEV_AIO_H */
31