diff options
Diffstat (limited to 'fs/bcachefs/subvolume.h')
-rw-r--r-- | fs/bcachefs/subvolume.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h index 65f108a83835..7c488c3d78e0 100644 --- a/fs/bcachefs/subvolume.h +++ b/fs/bcachefs/subvolume.h @@ -68,6 +68,13 @@ static inline bool bch2_snapshot_is_ancestor(struct bch_fs *c, u32 id, u32 ances return id == ancestor; } +static inline bool bch2_snapshot_has_children(struct bch_fs *c, u32 id) +{ + struct snapshot_t *t = snapshot_t(c, id); + + return (t->children[0]|t->children[1]) != 0; +} + static inline bool snapshot_list_has_id(snapshot_id_list *s, u32 id) { u32 *i; |