From 7f6ff935f74e8bb3257314f7e31182b6ad96198a Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 29 Dec 2021 13:50:50 -0500 Subject: bcachefs: New snapshot unit test This still needs to be expanded more, but this adds a basic test for BTREE_ITER_FILTER_SNAPSHOTS. Signed-off-by: Kent Overstreet --- fs/bcachefs/subvolume.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/bcachefs/subvolume.h') diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h index e4c3fdcdf22f..4abe53df2788 100644 --- a/fs/bcachefs/subvolume.h +++ b/fs/bcachefs/subvolume.h @@ -122,6 +122,10 @@ int bch2_snapshot_get_subvol(struct btree_trans *, u32, struct bch_subvolume *); int bch2_subvolume_get_snapshot(struct btree_trans *, u32, u32 *); +/* only exported for tests: */ +int bch2_snapshot_node_create(struct btree_trans *, u32, + u32 *, u32 *, unsigned); + int bch2_subvolume_delete(struct btree_trans *, u32); int bch2_subvolume_unlink(struct btree_trans *, u32); int bch2_subvolume_create(struct btree_trans *, u64, u32, -- cgit v1.2.3-58-ga151