Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / md / dm-vdo / flush.h
blob97252d6656e0fb657641fa26514dc48eb8e8a068
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
6 #ifndef VDO_FLUSH_H
7 #define VDO_FLUSH_H
9 #include "funnel-workqueue.h"
10 #include "types.h"
11 #include "vio.h"
12 #include "wait-queue.h"
14 /* A marker for tracking which journal entries are affected by a flush request. */
15 struct vdo_flush {
16 /* The completion for enqueueing this flush request. */
17 struct vdo_completion completion;
18 /* The flush bios covered by this request */
19 struct bio_list bios;
20 /* The wait queue entry for this flush */
21 struct vdo_waiter waiter;
22 /* Which flush this struct represents */
23 sequence_number_t flush_generation;
26 struct flusher;
28 int __must_check vdo_make_flusher(struct vdo *vdo);
30 void vdo_free_flusher(struct flusher *flusher);
32 thread_id_t __must_check vdo_get_flusher_thread_id(struct flusher *flusher);
34 void vdo_complete_flushes(struct flusher *flusher);
36 void vdo_dump_flusher(const struct flusher *flusher);
38 void vdo_launch_flush(struct vdo *vdo, struct bio *bio);
40 void vdo_drain_flusher(struct flusher *flusher, struct vdo_completion *completion);
42 void vdo_resume_flusher(struct flusher *flusher, struct vdo_completion *parent);
44 #endif /* VDO_FLUSH_H */