printf: Remove unused 'bprintf'
[drm/drm-misc.git] / drivers / md / dm-vdo / io-submitter.h
blob80748699496f2d02f74f58faf6964a6e99034808
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
6 #ifndef VDO_IO_SUBMITTER_H
7 #define VDO_IO_SUBMITTER_H
9 #include <linux/bio.h>
11 #include "types.h"
13 struct io_submitter;
15 int vdo_make_io_submitter(unsigned int thread_count, unsigned int rotation_interval,
16 unsigned int max_requests_active, struct vdo *vdo,
17 struct io_submitter **io_submitter);
19 void vdo_cleanup_io_submitter(struct io_submitter *io_submitter);
21 void vdo_free_io_submitter(struct io_submitter *io_submitter);
23 void vdo_submit_vio(struct vdo_completion *completion);
25 void vdo_submit_data_vio(struct data_vio *data_vio);
27 void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
28 bio_end_io_t callback, vdo_action_fn error_handler,
29 blk_opf_t operation, char *data);
31 static inline void vdo_submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
32 bio_end_io_t callback, vdo_action_fn error_handler,
33 blk_opf_t operation)
35 __submit_metadata_vio(vio, physical, callback, error_handler,
36 operation, vio->data);
39 static inline void vdo_submit_flush_vio(struct vio *vio, bio_end_io_t callback,
40 vdo_action_fn error_handler)
42 /* FIXME: Can we just use REQ_OP_FLUSH? */
43 __submit_metadata_vio(vio, 0, callback, error_handler,
44 REQ_OP_WRITE | REQ_PREFLUSH, NULL);
47 #endif /* VDO_IO_SUBMITTER_H */