linux/fs/bcachefs/journal_types.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_JOURNAL_TYPES_H
#define _BCACHEFS_JOURNAL_TYPES_H

#include <linux/cache.h>
#include <linux/workqueue.h>

#include "alloc_types.h"
#include "super_types.h"
#include "fifo.h"

#define JOURNAL_BUF_BITS
#define JOURNAL_BUF_NR
#define JOURNAL_BUF_MASK

/*
 * We put JOURNAL_BUF_NR of these in struct journal; we used them for writes to
 * the journal that are being staged or in flight.
 */
struct journal_buf {};

/*
 * Something that makes a journal entry dirty - i.e. a btree node that has to be
 * flushed:
 */

enum journal_pin_type {};

struct journal_entry_pin_list {};

struct journal;
struct journal_entry_pin;
journal_pin_flush_fn;

struct journal_entry_pin {};

struct journal_res {};

journal_res_state;

/* bytes: */
#define JOURNAL_ENTRY_SIZE_MIN
#define JOURNAL_ENTRY_SIZE_MAX

/*
 * We stash some journal state as sentinal values in cur_entry_offset:
 * note - cur_entry_offset is in units of u64s
 */
#define JOURNAL_ENTRY_OFFSET_MAX

#define JOURNAL_ENTRY_CLOSED_VAL
#define JOURNAL_ENTRY_ERROR_VAL

struct journal_space {};

enum journal_space_from {};

#define JOURNAL_FLAGS()

enum journal_flags {};

/* Reasons we may fail to get a journal reservation: */
#define JOURNAL_ERRORS()

enum journal_errors {};

darray_u64;

struct journal_bio {};

/* Embedded in struct bch_fs */
struct journal {} __aligned();

/*
 * Embedded in struct bch_dev. First three fields refer to the array of journal
 * buckets, in bch_sb.
 */
struct journal_device {};

/*
 * journal_entry_res - reserve space in every journal entry:
 */
struct journal_entry_res {};

#endif /* _BCACHEFS_JOURNAL_TYPES_H */