1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_SUPER_TYPES_H
3#define _BCACHEFS_SUPER_TYPES_H
4
5struct bch_sb_handle {
6 struct bch_sb *sb;
7 struct file *s_bdev_file;
8 struct block_device *bdev;
9 char *sb_name;
10 struct bio *bio;
11 void *holder;
12 size_t buffer_size;
13 blk_mode_t mode;
14 unsigned have_layout:1;
15 unsigned have_bio:1;
16 unsigned fs_sb:1;
17 u64 seq;
18};
19
20struct bch_devs_mask {
21 unsigned long d[BITS_TO_LONGS(BCH_SB_MEMBERS_MAX)];
22};
23
24struct bch_devs_list {
25 u8 nr;
26 u8 data[BCH_BKEY_PTRS_MAX];
27};
28
29struct bch_member_cpu {
30 u64 nbuckets; /* device size */
31 u16 first_bucket; /* index of first bucket used */
32 u16 bucket_size; /* sectors */
33 u16 group;
34 u8 state;
35 u8 discard;
36 u8 data_allowed;
37 u8 durability;
38 u8 freespace_initialized;
39 u8 valid;
40 u8 btree_bitmap_shift;
41 u64 btree_allocated_bitmap;
42};
43
44#endif /* _BCACHEFS_SUPER_TYPES_H */
45

source code of linux/fs/bcachefs/super_types.h