X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fsubvolume_types.h;h=ae644adfc391680d85b6fe53c25f08ae9337e037;hb=1f79cf3825e94fcb146d417b6dda9b94c93c7a53;hp=aa49c45a35ab2d2ee853b3119f349bb189919a39;hpb=7f102ee83d83fd918783ca542fac1574f9b2c623;p=bcachefs-tools-debian diff --git a/libbcachefs/subvolume_types.h b/libbcachefs/subvolume_types.h index aa49c45..ae644ad 100644 --- a/libbcachefs/subvolume_types.h +++ b/libbcachefs/subvolume_types.h @@ -6,11 +6,25 @@ typedef DARRAY(u32) snapshot_id_list; +#define IS_ANCESTOR_BITMAP 128 + struct snapshot_t { u32 parent; + u32 skip[3]; + u32 depth; u32 children[2]; u32 subvol; /* Nonzero only if a subvolume points to this node: */ + u32 tree; u32 equiv; + unsigned long is_ancestor[BITS_TO_LONGS(IS_ANCESTOR_BITMAP)]; +}; + +struct snapshot_table { +#ifndef RUST_BINDGEN + DECLARE_FLEX_ARRAY(struct snapshot_t, s); +#else + struct snapshot_t s[0]; +#endif }; typedef struct {