]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/subvolume_types.h
Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in rebalance_work()
[bcachefs-tools-debian] / libbcachefs / subvolume_types.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_SUBVOLUME_TYPES_H
3 #define _BCACHEFS_SUBVOLUME_TYPES_H
4
5 #include "darray.h"
6
7 typedef DARRAY(u32) snapshot_id_list;
8
9 #define IS_ANCESTOR_BITMAP      128
10
11 struct snapshot_t {
12         u32                     parent;
13         u32                     skip[3];
14         u32                     depth;
15         u32                     children[2];
16         u32                     subvol; /* Nonzero only if a subvolume points to this node: */
17         u32                     tree;
18         u32                     equiv;
19         unsigned long           is_ancestor[BITS_TO_LONGS(IS_ANCESTOR_BITMAP)];
20 };
21
22 struct snapshot_table {
23         struct snapshot_t       s[0];
24 };
25
26 typedef struct {
27         u32             subvol;
28         u64             inum;
29 } subvol_inum;
30
31 #endif /* _BCACHEFS_SUBVOLUME_TYPES_H */