xref: /spdk/module/fsdev/aio/fsdev_aio.h (revision 8afdeef3becfe9409cc9e7372bd0bc10e8b7d46d)
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 };
20 
21 typedef void (*spdk_delete_aio_fsdev_complete)(void *cb_arg, int fsdeverrno);
22 
23 void spdk_fsdev_aio_get_default_opts(struct spdk_fsdev_aio_opts *opts);
24 
25 int spdk_fsdev_aio_create(struct spdk_fsdev **fsdev, const char *name, const char *root_path,
26 			  const struct spdk_fsdev_aio_opts *opts);
27 void spdk_fsdev_aio_delete(const char *name, spdk_delete_aio_fsdev_complete cb_fn, void *cb_arg);
28 
29 #endif /* SPDK_FSDEV_AIO_H */
30