]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/subvolume_types.h
c596e4270690baf4193b73d29c63b50c5351da5f
[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 struct snapshot_t {
10         u32                     parent;
11         u32                     skip[3];
12         u32                     depth;
13         u32                     children[2];
14         u32                     subvol; /* Nonzero only if a subvolume points to this node: */
15         u32                     tree;
16         u32                     equiv;
17 };
18
19 struct snapshot_table {
20         struct snapshot_t       s[0];
21 };
22
23 typedef struct {
24         u32             subvol;
25         u64             inum;
26 } subvol_inum;
27
28 #endif /* _BCACHEFS_SUBVOLUME_TYPES_H */